Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, December 2006
unloading plugins with QPluginLoader


Message 1 in thread

Two questions:

1) To unload a plugin that you loaded with QPluginLoader, do you have
to use the original QPluginLoader object, or can you just create a new
one with the same path and call unload()?

2) What platforms support plugin unloading? I've created a bunch of
graphical modules using qt plugins, and would like to unload them when
not needed to free up the large amount of memory they use.

Thanks

-- 
 [ signature omitted ] 

Message 2 in thread

Hi,

> 1) To unload a plugin that you loaded with QPluginLoader, do you have
> to use the original QPluginLoader object, or can you just create a new
> one with the same path and call unload()?

 From QPluginLoader::unload():
	http://doc.trolltech.com/4.2/qpluginloader.html#unload
	If other instances of QPluginLoader are using the same plugin,
	the call will fail, and unloading will only happen when every
	instance has called unload().

--
 [ signature omitted ] 

Message 3 in thread

Hi,

> 2) What platforms support plugin unloading? I've created a bunch of
> graphical modules using qt plugins, and would like to unload them when
> not needed to free up the large amount of memory they use.

It is supported on all three platforms that Qt supports: Windows, X11, Mac.

--
 [ signature omitted ] 

Message 4 in thread

ahh, ok. I thought I remembered seeing a line in some docs (at some
time) about unloading being dependent on the OS' ability to unload.
good to hear, thanks!

On 12/27/06, Dimitri <dimitri@xxxxxxxxxxxxx> wrote:
> Hi,
>
> > 2) What platforms support plugin unloading? I've created a bunch of
> > graphical modules using qt plugins, and would like to unload them when
> > not needed to free up the large amount of memory they use.
>
> It is supported on all three platforms that Qt supports: Windows, X11, Mac.
>
> --
> Dimitri
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>


-- 
 [ signature omitted ] 

Message 5 in thread

Hi,

> ahh, ok. I thought I remembered seeing a line in some docs (at some
> time) about unloading being dependent on the OS' ability to unload.
> good to hear, thanks!

Yes, I too remember something like that, but I can't find documentation 
to support that. I seem to recall problems on older systems such as 
HP-UX 10, which is not supported by Qt 4 anymore. As far as I know 
unloading libraries works just fine in Qt 4.

--
 [ signature omitted ]