Python 2.0

Andrew Cooke andrew at andrewcooke.free-online.co.uk
Mon Jun 14 03:42:11 EDT 1999


In article <u37lpdssbq.fsf at ares.sys1.ngo.okisoft.co.jp>,
  Hisao Suzuki <suzuki611 at okisoft.co.jp> wrote:
> | >[Salvador]
> | > I have been using Java since it was invented and I haven't
programed a
> | > finaliser ever. They should run under so unknown and inconsistent
> | > environment that they are not usable at all (except for freeing
external
> | > resources).
>
> I have not ever programmed any finalizer, too, while I have
> programmed a lot of codes in Java.

I know this is getting off-topic, but just for general info, one example
of where a finalizer is useful in Java is when using JNI (the Java/C
interface) - it is often useful for a Java object to mirror a C
structure, and when the Java object is GCed you need to free() the C
stuff (which is an example of "freeing external resources", I guess).

Andrew


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




More information about the Python-list mailing list