[Pythonmac-SIG] Qdoffs (was Qd question)

Jack Jansen jack@oratrix.nl
Tue, 30 Jan 2001 23:00:21 +0100


The gworld object is automatically disposed of when the last reference 
to the Python object goes away.

This is the general philosophy of the Python Toolbox interfaces, but
unfortunately there are some necessary exceptions, such as Res objects 
(which can be either Handles or Resources, which need to be disposed
in different ways) or Ctl objects, which should be disposed if Python
created them, but not if Python obtained them through, say,
GetDialogItemAsControl (because they're owned by the dialog in that
case, and disposing of the control because we no longer reference it
from Python is definitely not what we want).

The interfaces are slowly being updated to a new scheme, whereby each
object carries a pointer to the disposal routine. Initially the
modules will set this pointer "correct", i.e. to the MacOS dispose
routine for objects that were created by Python and to an empty
routine for objects that Python obtains through other means. There
will be an interface to change this disposal behaviour from Python
code. 
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm