Free memory of included files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anod
Forum Newbie
Posts: 5
Joined: Wed Nov 14, 2007 12:23 pm
Location: Israel
Contact:

Free memory of included files

Post by anod »

Hello!

I try to find answer, isit possible to exclude included before files
Below example of my code:

Code: Select all

 
<?php
echo "START: ". memory_get_usage()." bytes<br/></br>\n\n";
include_once("Class.php");
$class = new Class();
unset($class);
print_R(get_included_files());
echo "END: ". memory_get_usage()." bytes<br/></br>\n\n";
?>
 
Class.php

Code: Select all

 
<?php
class Class { 
.....
}
?>
 
Result:

Code: Select all

 
START: 809092 bytes
END: 1008532 bytes
 
The problem is that i need include couple of files and work with big arrays...
See constant increasing of memory usage...
Is there any solution?

Thank you.
Post Reply