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.

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

Reply via email to