Constructor and Destructor methods...

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Constructor and Destructor methods...

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:54 am

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

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Constructor and Destructor methods...

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:54 am

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.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 27 guests

cron