|
Boost : |
From: conversy_at_[hidden]
Date: 2001-09-04 04:45:09
Hi.
Imagine that we want to wrap 2 kind of classes:
containers
objects that will be contained in containers
How do I increment the ref counter of an object that had been added in
a container object ?
example:
from mymodule import *
c=None
def foo():
globals c
c = container()
o = object()
c.add(o)
# here, o is destroyed since it's not used anymore
c.apply_bar_to_all_of_your_objects() # core dumps since one of the
object has been destroyed
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk