Karsten Krabbes just wrote an excellent reply regarding this, I just want to add a re-iteration:  Do NOT call finalize() yourself!!!


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jayson Joseph Thattil
Sent: Wednesday, July 06, 2005 11:20 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Remove Class from memory ?

Is the finalize() method in java will be called before
garbage collector clean up the object?

So if I want to do some thing before the destruction
of the object I can put the code in the finalize()
method right?

So the finalize() method is not destroying the object
but it is called before the destruction of the object
by GC.

I like to know How the finalize() in X++ different
from Java?

TJJ

--- "Subrahmanyam, Mamidi" <[EMAIL PROTECTED]> wrote:

> There is nothing in Java like Finalise....JVM takes
> care of the garbage collection in Java

> Can you talk aout in X++ context?

> Appreciate help.
> Thanks & regards,
> subbu

>
>
> Jesper Kehlet <[EMAIL PROTECTED]> wrote:
> Do NOT use the finalize() method.  Finalize is also
> a no-go in Java...  Instead, use < Class > = null.
> The JVM/GC will take care of the rest...
>
>
> ---------------------------------
> From: Axapta-Knowledge-Village@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Subrahmanyam, Mamidi
> Sent: Tuesday, July 05, 2005 10:00 AM
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: Re: [Axapta-Knowledge-Village] Remove Class
> from memory ?
>
>
>
> Hi ,

> I assume you are asking a 'Honest' question. ( Not
> because of you got in the exam :-) )

> Yes. Its like a garbage collector in JAVA and Delete
> call in C++.

> So If you have explicitly allocated a block of
> memory for a class ( Potentially your 'own' class )
> in order to realse the memory , You Need to call
> this.......................

> But I donlt where its allcated..But in C++/Java, Its
> always allocated on the stack....

> Good Luck.

> Thanks & Regards,
> subbu


>
>
> sdupontel1 <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Can we remove a class from memory using this syntax
> : <class>.finalize
> () ?
>
> Thank you
>
> Best regards
>
>
>
>
>
> Sharing the knowledge on Axapta.
>
>
>
> ---------------------------------
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
>
>
> Sharing the knowledge on Axapta.
>
>
>
> Sharing the knowledge on Axapta.
>
>
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
>     Visit your group "Axapta-Knowledge-Village" on
> the web.
>  
>     To unsubscribe from this group, send an email
> to:
>
> [EMAIL PROTECTED]
>  
>     Your use of Yahoo! Groups is subject to the
> Yahoo! Terms of Service.
>
>
> ---------------------------------
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Sharing the knowledge on Axapta.



Sharing the knowledge on Axapta.



YAHOO! GROUPS LINKS




Reply via email to