On 01/30/2015 04:12 PM, Sturla Molden wrote:
> Michael Torrie <torr...@gmail.com> wrote:
>  
>> Yes I can tell you haven't used C++.  Compared to C, I've always found
>> memory management in C++ to be quite a lot easier. The main reason is
>> that C++ guarantees objects will be destroyed when going out of scope.
>> So when designing a class, you put any allocation routines in the
>> constructor, and put deallocation routines in the destructor.  And it
>> just works.  This is something I miss in other languages, even Python.
> 
> Python has context managers for that.

Right I had forgotten about that.  That's a good solution for dynamic,
GC languages.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to