10-29-2010 09:38 AM
I can't find a clear explanation in the documentation for these functions:
does the DeleteTabPage( ) free all the memory resources of a tab? Or should I free all these resources before calling it?
Let me explain with an example:
then I want to discard this tab.
Should I call DiscardCtrl( ) and DeleteImage( ) before calling DeleteTabPage( ) to free the memory?
Or does DeleteTabPage( ) automatically do this?
Solved! Go to Solution.
11-01-2010 11:20 AM
DeleteTabPage() removes the tab page from the tab control and discards the tab page panel (where all the controls on the tab live). So you don't have to call DiscardCtrl() and DiscardImage()... DeleteTabPage() will take care of all this for you.
However, the help for InsertPanelAsTabPage() indicates that it makes a copy of the panel and inserts it as a tab page. Therefore, you still have to discard the panel that you passed to InsertPanelAsTabPage().
Hope this helps,
- jared