Garbage Collection Question

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

In article <2ce55ce2.0308281518.4be94efc at>,
Chaman Singh Verma <csv610 at> 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           <*>

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