Project

General

Profile

Delete widget after Wt::WScrollArea::takeWidget()

Added by dima s over 12 years ago

Hi,

I need to do some processing prior deletion of widget taken from WScrollArea so I use takeWidget method of WScrollArea. How can I then delete this taken widget to free memory? If I simply use delete statement to free it I get access violation exception.

Regards,

dima


Replies (3)

RE: Delete widget after Wt::WScrollArea::takeWidget() - Added by Wim Dumon over 12 years ago

That should work. Maybe take a look at the stack trace when it crashes or try valgrind?

Wim.

RE: Delete widget after Wt::WScrollArea::takeWidget() - Added by dima s over 12 years ago

I was deleting it from another thread. I had to obtain UpdateLock to delete it.

Regards,

dima

RE: Delete widget after Wt::WScrollArea::takeWidget() - Added by Wim Dumon over 12 years ago

True - any time you touch a widget tree from a thread, whether it's to read or write or delete or whatever, you must hold the update lock...

    (1-3/3)