gobject: forbid finalization-during-construction

If a constructor() implementation created an object but then unreffed
it rather than returning it, that object would get left on the
construction_objects list, which would cause problems later when that
memory location got reused by another object.

"Fix" this by making it fail intentionally, and add a test for it (and
for the normal, working singleton case).

https://bugzilla.gnome.org/show_bug.cgi?id=661576
This commit is contained in:
Dan Winship
2013-04-29 13:04:11 -04:00
parent a7bd6c47db
commit 0d62eb467f
4 changed files with 169 additions and 10 deletions

View File

@@ -4,6 +4,7 @@ closure
dynamictests
enums
ifaceproperties
object
param
properties
qdata