|
Re: how to prevent objects from being garbage collected.: msg#00127programming.swig
You can use (or misuse) %feature("unref") MyClass "" to prevent the object from been deleted when the script language thinks is required. If your C++ libraryt has a ref. counting mechanism, then you can use %feature("ref") RCObj "$this->ref();" %feature("unref") RCObj "$this->unref();" see refcount.i in Examples/test-suite for more examples. Marcelo meinrad recheis wrote: hi, _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: trouble swigging a library: 00127, Anton Deguet |
|---|---|
| Next by Date: | Proxy classes from nested C structs?: 00127, Sean Gillies |
| Previous by Thread: | Re: how to prevent objects from being garbage collected.i: 00127, Luigi Ballabio |
| Next by Thread: | Re: how to prevent objects from being garbage collected.: 00127, Kevin Smith |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |