|
Re: Next SWIG release: msg#00165programming.swig
Luigi Ballabio writes: > At 08:34 PM 1/26/03 -0600, David Beazley wrote: > >Also, if there are any minor feature requests, please let us know. > > Now that I think of it, there is the dreaded ownership problem---i.e., the > fact that seemingly innocent instructions such as: > > foo.bar = Bar() > > can cause every kind of trouble if the interface is: > > class Bar; > > class Foo { > public: > Bar* bar; > }; > > If I'm not mistaken, you had thought about this and started modifying the > internal SWIG functions so that the reference count of foo.bar could be > incremented, right? What was the status? > I'm pretty sure (although I'll have to double check) that the Python module drops ownership on assignment in this example. In other words, the member gets set, the proxy class for Bar gets destroyed, and the underlying object persists. There is some discussion about this here: http://www.swig.org/Doc1.3/Python.html#n30 Cheers, Dave _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Next SWIG release: 00165, Koester Uwe (TPM/DM) |
|---|---|
| Next by Date: | RE: Next SWIG release: 00165, David Beazley |
| Previous by Thread: | Re: Next SWIG releasei: 00165, Luigi Ballabio |
| Next by Thread: | Re: Next SWIG release: 00165, Zhong Ren |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |