in reply to Storing arrays as object variables
Perl uses a reference-counting garbage collection scheme. Declaring the lexical increments the reference counter to one, and storing a reference in the object increments the counter to two. When the @array name goes out of scope, the counter is decremented back to one. Since the object still holds a reference, the actual array data structure will not be garbage collected.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Storing arrays as object variables
by flounder99 (Friar) on Jul 20, 2002 at 16:59 UTC |