Garbage Collection Question

Aahz aahz at pythoncraft.com
Fri Aug 29 02:26:41 CEST 2003


In article <2ce55ce2.0308281518.4be94efc at posting.google.com>,
Chaman Singh Verma <csv610 at yahoo.com> wrote:
>
>I am trying to integrate C++ with Python. I read that Python does
>automatic garbage collection. I am creating new objects in C++ and
>passing to Python, I don't know now who should control deleting the
>objects. If I create objects in C++ do I have to clean them or Python
>will use GC to remove unwanted objects.

Depends whether it's a Python object created with a Python API call.  If
not, your objects will never be touched by Python.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

This is Python.  We don't care much about theory, except where it intersects 
with useful practice.  --Aahz




More information about the Python-list mailing list