Jump to content

(SOLVED) Widget::TextArea assert failure on delete C++


GorzenDev
 Share

Recommended Posts

i get a Debug Assertion Failure when closing my app in C++
debugging shows the error occurs at the destructor of my class on this line:

delete logTextArea;
//same result
//logTextArea->Release();

logTextArea is a Widget::TextArea()

the debugger tells me the Expression: list iterator not incrementable.

does Widget::TextArea have a bug in his destructor ?

or is this error on my part somehow?

i do not use any type of list in my code myself at the moment..

-------------------------------------

Solved

i figured out that when releasing/deleting a Widget::TextArea you need to clear the kids list first,

even when its just a blank TextArea who is not a parent of any other widget.

the code below gives no assertion failure

logTextArea->kids.clear();
logTextArea->Release();

 

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...