473,396 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

can I "dispose" of an array?

Is there a way I can "dispose" of an array. For example I need to use an
array for short time in a script. After I've used that data structure I
want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.
Jul 17 '05 #1
6 4152

"leegold2" <le*****@nospam.net> wrote in message
news:LlGmd.6612$GV5.1543@trnddc04...
Is there a way I can "dispose" of an array. For example I need to use an
array for short time in a script. After I've used that data structure I
want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.


unset($array);

--
Tony Marston

http://www.tonymarston.net

Jul 17 '05 #2
leegold2 wrote:
Is there a way I can "dispose" of an array. For example I need to use an
array for short time in a script. After I've used that data structure I
want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.


http://www.php.net/unset
--
Mail sent to my "From:" address is publicly readable at http://www.dodgeit.com/
== ** ## !! !! ## ** ==
TEXT-ONLY mail to the complete "Reply-To:" address ("My Name" <my@address>) may
bypass the spam filter. I will answer all pertinent mails from a valid address.
Jul 17 '05 #3
On Wed, 17 Nov 2004 11:11:39 GMT, leegold2 wrote:
Is there a way I can "dispose" of an array. For example I need to use an
array for short time in a script. After I've used that data structure I
want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.


try unset($arrayname);
Jul 17 '05 #4
On Wed, 17 Nov 2004 11:11:39 GMT, leegold2 wrote:
Is there a way I can "dispose" of an array. For example I need to use an
array for short time in a script. After I've used that data structure I
want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.


try:

unset($array_name);

it says in manual that unset destroys variable, so i presume that also
frees all resources that it used
Jul 17 '05 #5
leegold2 wrote:
Is there a way I can "dispose" of an array. For example I need to use an
array for short time in a script. After I've used that data structure I
want to dispose of it to free-up resources. Is there a way? Thanks, Lee G.


Thank you!
Jul 17 '05 #6
> > Is there a way I can "dispose" of an array. [snip]

try unset($arrayname);


Does that get rid of everything in the array immediately? Or does PHP
have some sort of garbage collection? Or do things just hang out until
the script ends? (Or maybe a combination of all these?)

Did I use enough question marks?

--cd
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stefan De Schepper | last post by:
Hi all, Do I have to explicitly dispose all disposable objects? For some obscure reason I see for instance brushes or graphics been disposed, but never contextmenus and such. Can anyone explain...
2
by: Serge Klokov | last post by:
Hi! 1. Please, help with example "paint on form by mouse" 2. Below is my example, but it clear the line after each Refresh()... how to fix? 3. How to draw the line in Mouse_Move event? ...
7
by: charliewest | last post by:
Using .Net CF, i have created a 2 dimension ArrayList, and "binded" this list to a ComboBox control using the "DataSource" property. I have set the DisplaySource and ValueMember properties as well....
14
by: Atara | last post by:
I know in C++ it is true. but what about VB .Net and its GarbageCollector ? For example, consider the following case. Does f2() needs to do any disposing code ? Public Sub f1() As...
71
by: Greg | last post by:
Is it your general opinion that C# is generally designed/intended/ready to replace C++? I know the answer is not black and white but please repond YES or NO (add any comments if you would like) ...
3
by: boeledi | last post by:
Dear All, (First of all this is not a c# piece of code but it does not really matter). I would really appreciate if someone could help me. I am developing an ASP.NET web site and I have to...
5
by: Peter | last post by:
Hi I have a class which implements IDisposable, but it doesn't really use the Dispose method for cleaning up resources, it uses it for completing a calculation. Actually I think it seems...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.