title: How to free memory from an openstreet map
body: <p>I am creating a website, and one of the scripts uses a map in openstreetmap and leaflet, my problem is that after loading that script with the map, I run out of memory when opening one other specific script.</p>
  
  <p>I tried clearing the cache, and unsetting variables, but the problem remains.</p>
  
  <p>If I raise the memory in php.ini everything works just fine, but I can't do that, i need to somehow free some memory since raising memory size is not a option unfortunantely.</p>
  
  <p>EDIT: After i used memory_get_usage() and memory_get_peak_usage() on the script that does not fully load this was returned</p>
  
  <p>The script is now using: 195728KB of memory.
  Peak usage: 238372KB of memory.</p>
  
  <p>It seems I was wrong to assume that the error was from the map, I apologize for my mistake.</p>