Make a destroy member function and use it consistently.
Don't let objects of your class go out of scope before calling the
destroyer.
The destroyer does the count--

On Sep 4, 5:51 am, "CHEN HAN A" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have experience for c++, but I con't find deconstruction function in
> java.
> i know java's garbage collection.
>
> But consider this scenario:
> I use class variable "count" to count the number of object and "count++"
> in constructor.
> When a object have to be destory, "count--" have to be execute.
> How can i do?
>
> Thanks!
> Best Regards,
> Chen Han

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to