LWN.net Logo

RAII, but no GC?

RAII, but no GC?

Posted Jun 17, 2010 19:05 UTC (Thu) by sbishop (guest, #33061)
In reply to: Pauses by jordanb
Parent article: The Managed Runtime Initiative

I am not aware of a modern language which does not have built-in GC. (Though "built-in GC" is a requirement under most people's definition of "modern language".) Which languages are you thinking of? I don't mean to argue with you; I'm just curious.

I'm also curious to know where RAII is used outside of C++.


(Log in to post comments)

RAII, but no GC?

Posted Jun 17, 2010 19:29 UTC (Thu) by alextingle (guest, #20593) [Link]

Python uses RAII, I believe.

RAII, but no GC?

Posted Jun 17, 2010 21:18 UTC (Thu) by tack (subscriber, #12542) [Link]

Not exactly. It's a peculiarity of (current versions of) CPython that RAII patterns can work, however there's nothing in the language that specifies that behavior, and you can't expect it from other implementations like Jython, or perhaps not even from future versions of CPython.

RAII, but no GC?

Posted Jun 19, 2010 13:39 UTC (Sat) by cortana (subscriber, #24596) [Link]

Perhaps Alex was referring to to the 'with' statement: http://docs.python.org/reference/compound_stmts.html#with

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds