Re: VNC Reconnect logic / proper destruction of a VncDisplay



On Thu, Feb 11, 2016 at 09:34:00AM -0500, Gerald Grignan wrote:
Hello all,

I am using gtk-vnc-0.3.10 (on RHEL6), but also have used 0.5.2 (on RHEL7)
with similar results. I've been having issues with properly destroying
everything allocated to the VncDisplay.

The main driver for this is to have a vncviewer (started off with the
gvncviewer.c example) which will automatically attempt reconnecting upon
connection loss. While what I have is accomplishing the goal, every
reconnect attempt leaks more and more memory (allocated during the
vnc_display_open_host() call).

Valgrind seems to point to the GdkPixBuf area, but I would think that would
be destroyed when I destroy the vnc object.

What I'm wondering is -- what's going wrong here (I don't see any obvious
leaks on my part), or is there a better alternative to reconnecting that I
could use instead?

Just don't destroy the VncDisplay object. Simply call vnc_display_open_host()
again when you want to reconnect. The existing widget should handle that
fine.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]