Skip to content

How to delete/kill the Reference of a TWindow/TDialog #145

Answered by magiblot
paule32 asked this question in Q&A
Discussion options

You must be logged in to vote

When you delete an object, all references to it become invalid, meaning that you must make sure not use these references at all.

In this case you would either have to make sure that the info_message_window field gets set back to nullptr when closing the window, or simply avoid using such kind of mutable references, which is what the Turbo Vision manual suggests (page 168, Chapter 9: Event-driven programming):


Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by paule32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants