110
edits
(pyobj notes) |
m (→Python Objects in Octave: formatting) |
||
Line 124: | Line 124: | ||
1. `x` stores the pointer to `d`. The `@pyobj` ctor creates a dummy reference to `d`, this prevents GC | 1. `x` stores the pointer to `d`. The `@pyobj` ctor creates a dummy reference to `d`, this prevents GC | ||
2. on deletion of x (`clear x`) we delete the dummy reference in Python. | 2. on deletion of x (`clear x`) we delete the dummy reference in Python. | ||
Other ideas: | Other ideas: | ||
* Store the `repr` as a string in `x`. But this makes a copy of the object rather than a reference to the original object. |
edits