Hi Mat,

I clearly understand why the code works
and admit such memory management system enables many things
which C/C++ never support.

I must say cool the feature is.

really thanks much.

Yes, I understood your question.  It is a good question from a C++
programmer.  I am sorry I did not answer clearly enough.


with using {garbage-collect},
I thought I had removed the instance of class bbb.


It does *not* remove the instance of class bbb.

garbage-collect will not remove any object that might be used later.

Since your bbb will be used when you press the button, garbage-collect
knows not to free it.  Otherwise your program would crash, as you
said.  garbage-collect is very smart.  It will only free objects that
it can prove will never be used again.

In Curl freeing an object you will use again later is impossible.  You
do not need to worry about memory management, it is automatic.
This is the same as Java and C#, but different from C and C++.
C and C++ can crash if you free an object you will use again later.

This is one reason that Java and C# have become so popular.
Managing memory is much easier.

-Mat



-- ----- Maekawa Takanobu e-mail:[EMAIL PROTECTED] CANSOFT,INC.Tel:044(969)9747 Fax:044(969)9748 http://www.cansoft.co.jp/

*******************************************
To unsubscribe from this list, send a mail to:
mailto:[EMAIL PROTECTED]
To contact a human list administrator, send a mail to:
mailto:[EMAIL PROTECTED]
To recieve a list of other options for this list, send a mail to:
mailto:[EMAIL PROTECTED]



Reply via email to