Hi,

In message "Re: GC run at end of script execution - order in which objects are claimed?"
    on Sat, 4 Dec 2004 01:33:11 +0900, Tilman Sauerbeck <tilman / code-monkey.de> writes:

|> Is it OK to terminate the process without any freeing?
|
|That would be very hackish IMHO :/

I'm not sure how much hackish it is.  Basically all resources are
reclaimed by the operating system at the process termination.  If you
have something that can not be reclaimed automatically by the OS,
you can not expect GC to handle it automagically either.

|> Or is it mandatory to destruct objects in certain order?
|
|Since the random free'ing is causing sincere memory management problems
|in my extension, I'd say "yes". Although I think there must be some
|not-so-hard way to avoid this; there must have been extension developers
|who had the very same problem.

Unfortunately I cannot think of any "not-so-hard way" to free them in
the order you expect.  Freeing in the "right" order increases the
process termination cost by the order of magnitudes, I suspect.  I
don't think it's worth the cost.

The memory will be vanished with the process anyway, unless your
"memory" resides outside of the process, i.e. in the database.

Don't get me wrong.  I'm saying that I don't know how to satisfy your
requirement (yet), not refusing you or your idea.

							matz.