We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › array flush / clear / empty
Page Index Toggle Pages: 1
array flush / clear / empty (Read 990 times)
array flush / clear / empty
May 6th, 2005, 10:05pm
 
What's the most efficient method of flushing all the data from an array?

I was thinking of flushing all data from an array during a program but it's not necessary right now (I've figured out a way of placing an outside counter that will tell me if there are gaps large enough for me deal with).

I'm still curious though. I saw in the alpha section someone had used a System.arraycopy() to flush. Or can I do it by reinitialising the array? Or should I use a for loop?

It would be handy to know because this applies to pixels[].
Page Index Toggle Pages: 1