Welcome, Guest. Please Login or Register.
April 28, 2025, 05:51:16 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  General Category  |  Feedback  |  Delete vars when finished « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Delete vars when finished  (Read 530 times)
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Delete vars when finished
« on: August 15, 2002, 07:46:33 AM »
Reply with quote

Thinking about a couple of my scripts and they would definately use the standard 8mb of memory if I didn't remove the variables (especially global) when I was finished.  They just eat and eat up memory.  Then I thought about people having problems with too much mem usage from PHP (8mb usually).  I figure that it must have something to do with including files and such.  So rather than having people come across these bugs in the future, why not initiate the variables with $var = '' and end the function the same way :)
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Zef Hemel
Advisor
YaBB God
*****
Posts: 1182


Me too

ICQ - 61109769 WWW
Re:Delete vars when finished
« Reply #1 on: August 15, 2002, 08:18:50 AM »
Reply with quote

Memory should be cleared automatically, it's PHPs job to clean up the garbage not ours :P
Logged

groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:Delete vars when finished
« Reply #2 on: August 15, 2002, 07:01:08 PM »
Reply with quote

lol.. but I am talking about while in a script.  
* groundup tries to think of something that requires a lot of resources...

hmm.. I will post when I am done with my client's work.
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  General Category  |  Feedback  |  Delete vars when finished « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.027 seconds with 17 queries.