Re: How to use Glib::Interface derived interfaces in custom classes?
- From: Krzesimir Nowak <qdlacz gmail com>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: How to use Glib::Interface derived interfaces in custom classes?
- Date: Mon, 08 Nov 2010 14:10:36 +0100
On Mon, 2010-11-08 at 13:37 +0100, Murray Cumming wrote:
> Check your vfuncs. That's what I would suggest at first. You can try
> commenting them out completely to check if they are the problem.
In this case commenting out rather won't help, because I'm working with
a class implementing an interface and I'm overriding some virtual
methods.
> I notice that you have some conversions for vfuncs or signals in the
> main .m4 convert file, but you should really put them in the .hg files
> to avoid using them for regular methods and to make sure that they use
> the correct reference counting.
Yes, I already noticed that there are conversion macros defined
specially for vfunc (mostly adding true as second parameter to
Glib::wrap(), like in Gtk::Style for example). For now I quickly put a
macro before _WRAP_VFUNC which makes additional reference and a macro
after it which doesn't make additional reference - that fixed some
issues. But this is temporary solution and in the end I'll do like you
say.
The problem now is that I have a list with three RefPtrs and after some
operations somewhere the first two elements are ok, but third becomes
dangling pointer which ends with segfault, when trying to
increase/decrease its ref count.
For now I'm compiling whole stack with some debug options enabled (like
enable-debug-refcounting in glibmm) and I'll see what it'll show.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]