@nish I'm looking for a more automated approach, so that when the high-level wrapper goes out of scope/gets deleted, it automatically unrefs/frees the gobject CPointer. Objects could potentially be long-lived as well (assigned to properties, for example), and could outlive a simple scoped block.
1 reply
ibelieve: even longer living objects still have some natural lifetime, (ab)using memory management for resource management is generally not a very good idea (i.e.
http://www.oracle.com/technetwork/articles/java/finalization-137655.html and similar). Maybe investing some effort into rethinking the desired behavior could make your bindings more easily usable?