On 26/10/2013 20:29, Matthew Brush wrote:
If the GeanyDocument were a GObject (or we added hand-rolled reference counting), the document would never get freed from under the code that uses them's backs.
My concern is that we might not find all the code that assumes documents aren't freed. Some code might not be updated and would access the wrong memory. I'm not certain, but I think there may be some code that retains pointers without checking is_valid. Maybe I'm being over-cautious.
Personally I think reference counting would be OTT for this (particularly manually incremented/decremented ref counting), there doesn't seem to be a sensible reason to free document memory IMO.