[Interest] QImage in a signal over plugin boundaries... problem?
Guido Seifert
wargand at gmx.de
Thu Nov 22 01:39:01 CET 2012
Hi,
I have a strange problem, which seems only to exists under Windows.
When I create 5000 QImages in a loop and add them to a QList<QImage> in
the main program, I have absolutely no problem. My ram is by far big
enough for this number.
However, I have written a plugin, which takes two QImages and creates
a series of QImages, which I use as keyframes for a short animation.
The 24 resulting QImages are sent one after another via signal
(imageSig(const QImage &)) to the main program.
The problem is, after ~750 images I cannot create more QImages. I get
'0 image ... out of memory' messages. Even more strange, at one time
there should not exist more than 240 images. After 10 sequences are done
the previous 240 Images should go out of focus and get automatically
deleted. Actually the whole plugin gets deleted. For the next run I create
a new instance.
But even if none of the memory of my QImages gets freed and I have a huge
memory leak, 750 should be no problem at all.
Under Linux the code works perfectly. I have no idea how dlls or qt
plugins work under windows. Do they get their own stack space? Like a
thread? And if I keep a reference of an image, which I created in the
plugin, will it remain on the plugin's stack? Sounds strange for me, but
after days of work I simply don't see a way how I could run out of memory.
Guido
More information about the Interest
mailing list