GObject (and hence Vala) already knows how to memory-manage a Contact,
because it's a boxed type. Trying to do our own memory-management
anyway results in an occasional (50%?) double-free and crash.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=695719
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip@tecnocode.co.uk>
set { this.change_web_service_addresses.begin (value); }
}
- private Contact _lsw_contact;
+ private Contact? _lsw_contact = null;
/**
* The Contact from libsocialweb
get { return this._lsw_contact; }
construct
{
- if (_lsw_contact != null && _lsw_contact != value)
- {
- _lsw_contact.unref ();
- }
- this._lsw_contact = value.ref ();
+ this._lsw_contact = value;
}
}
~Persona ()
{
debug ("Destroying Sw.Persona '%s': %p", this.uid, this);
- this._lsw_contact.unref ();
- this._lsw_contact = null;
}
/**