title: SimpleXML Free memory consumed from load file
body: <p>I am using simpleXML to parse a file (around 341 mb).
  Upon loading the file, it consumes a considerable amount of RAM which is okay. My main problem is that the memory is not freed until the cron exits.</p>
  
  <p>I assumed that if I unset the referenced xml object the memory reserved for the in-memory file would also be release, but this is not the case.</p>
  
  <p>Is it possible to free the memory for the referenced file?</p>
  
  <p>Example code (dont know if GC can help):</p>
  
  <pre><code>gc_enable();
  $this-&gt;xml = simplexml_load_file($filePath);
  $val = $this-&gt;getValues('/SOME/PATH/HERE');
  
  foreach($val as $a) {
     $this-&gt;tags[] = (string) $a-&gt;$tagName;
  }
  
  $this-&gt;xml = null;
  unset($this-&gt;xml);
  gc_collect_cycles();
  </code></pre>