Page 1 of 1

Constructor and Destructor methods...

Posted: Fri Aug 07, 2009 11:54 am
by ConvertFromOldNGs
by JADE Kid - Ray Hidayat >> Thu, 1 Jun 2000 20:26:20 GMT

I have seen these constructor and destructor methods used in C++
It might be useful if it could be done in JADE.

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

Re: Constructor and Destructor methods...

Posted: Fri Aug 07, 2009 11:54 am
by ConvertFromOldNGs
by Dean Cooper >> Thu, 1 Jun 2000 22:16:46 GMT
I have seen these constructor and destructor methods used in C++ It might be useful if it could be done in JADE.

You can already. That's what the "create" (constructor) and "delete" (destructor) methods are for. When you create an object, the "create" methods of the object's class and superclasses are invoked automatically. Likewise, when you delete an object, the "delete" methods are invoked. Constructors are invoked in hierarchy order (ie: starts with Object and executes down to the class of the object being created). Destructors are executed in reverse hierarchy order (ie: start with the class of the object being deleted and execute up to Object).

Dean.