atholon Posted January 3, 2009 Share Posted January 3, 2009 Is there a way to clear this array through PHP? I don't want the file to be in memory once I have the file saved to my server. But my script has other things it needs to do before redirecting. Link to comment https://forums.phpfreaks.com/topic/139373-_file-array/ Share on other sites More sharing options...
ratcateme Posted January 3, 2009 Share Posted January 3, 2009 why would you need to clear it the file will be lost from memmory as soon as the script ends but you might be able to say $_FILES = array(); dont know what that would do but might help you? Scott. Link to comment https://forums.phpfreaks.com/topic/139373-_file-array/#findComment-728966 Share on other sites More sharing options...
atholon Posted January 3, 2009 Author Share Posted January 3, 2009 The script I am writing has some other stuff to do and I want to have as much memory available as possible. I was thinking of doing that...but I wasn't sure if there was a better way. Link to comment https://forums.phpfreaks.com/topic/139373-_file-array/#findComment-728968 Share on other sites More sharing options...
DarkWater Posted January 3, 2009 Share Posted January 3, 2009 The file itself isn't in memory...just the like, 50 bytes of data about it. Clearing the array is highly unnecessary. I'd try to optimize where it counts and make the memory intensive parts use less memory. Link to comment https://forums.phpfreaks.com/topic/139373-_file-array/#findComment-728969 Share on other sites More sharing options...
atholon Posted January 3, 2009 Author Share Posted January 3, 2009 Your right, it looks like 2mb of memory is used by the other scripts that are included. Never realized how much the GD library hogs memory. Link to comment https://forums.phpfreaks.com/topic/139373-_file-array/#findComment-728997 Share on other sites More sharing options...
DarkWater Posted January 4, 2009 Share Posted January 4, 2009 GD takes a ton and a half of memory. Link to comment https://forums.phpfreaks.com/topic/139373-_file-array/#findComment-729006 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.