When to free GnomeVFSVolumeOpCallback?



Aloha,

I'm in the process of wrapping the GnomeVFSDrive and GnomeVFSVolume API
for Perl (better late than never), and I'm wondering how to know when
the callbacks for

  gnome_vfs_drive_mount, _umount, _eject and
  gnome_vfs_volume_unmount, _eject

will no longer be called and can be safely freed.  From the looks of it
the code first spawns a thread which spawns an external command to do
the job and then installs an idle handler which finally calls the
callback.

One way to do it is to put a reference to every callback structure into
the GObject so that they get destroyed when the drive/volume is
finalized.  That doesn't seem optimal, though.

So, is there another way to safely free the callbacks?

TIA,
-Torsten




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