Hello!

I use WMemoryResource and WImage to render dynamically generated images.
Then, I use WTimer to generate time events once per second and need to
update WImage picture in the timer callback. I do it like this:

initialization:
res = new WMemoryResource("image/jpeg");
img = new WImage();

timer callback:
res->setData(img_data_ptr, img_data_size);
img->setResource(res);

The problem with this code is that very rearly I get application crashs
somewhere under WMemoryResource::handleRequset and sometimes I don't see the
image in the brouser. I guess is that it should be some concurrency issue,
but as I undestand it should safe to update any Wt object from a
WTimerCallback, so I was wondering if I should use some different method?

Thanks.
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to