Memory improvements in the extension system
Some improvements to memory management are made in the extension system.
- The extension objects, which used to be carelessly allocated on the heap and left there to leak are now owned by the "Extension database".
- A memory issue with the ImageMagick extension is fixed: the memory was allocated with array
new
but freed with non-arraydelete
. Previously this issue was never seen because the destructor was not called, now it is not seen because we usestd::vector
instead of callingnew
anddelete
manually.
Note: The extension system still leaks massively, but somewhat less massively than before.