Skip to content
Commit e761de9c authored by Sébastien Wilmet's avatar Sébastien Wilmet
Browse files

Use a DSO destructor

For the unit tests in testsuite/, the destructor is not called because
libgtksourceview-core.la is statically linked to the unit test programs.
A solution would be to have the private function
_gtksourceview_shutdown() that can be called in unit tests.

But the destructor is correctly called in e.g. tests/test-widget or
gedit, so it is already useful.

At least with gobject-list
https://blogs.gnome.org/danni/2011/02/17/ld_preload-gobject-lifetime-debugging-tool/
we can verify that all GtkSource GObjects are finalized. Unfortunately
the GtkSourceView destructor runs *after* the "Still Alive:" list that
gobject-list prints. But by counting the number of "Finalized object"
lines that follow, we can verify that all GObject are finalized.
parent 6c660e84
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment