[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::visualc

Title:Microsoft Visual C/C++
Moderator:PLUGH::needle
Created:Tue Mar 16 1993
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1121
Total number of notes:4385

1089.0. "CTreeCtrl::DeleteItem and children" by 43406::therml.reo.dec.com::BAKERS () Wed Feb 26 1997 11:35

I'm using a CTreeCtrl control. Does anyone know whether deleting an item from 
the control, will cause all children of that item to be deleted too?

The documentation isn't clear on this, and I'm wondering whether I'm leaving 
myself open to memory leaks if I don't explicity delete children.

Thanks in advance for any info.
Stephen
T.RTitleUserPersonal
Name
DateLines
1089.1YesIOSG::TALLETTwww-iosg.reo.dec.com/Tallett.htmlTue Mar 04 1997 11:1110
    
    	I'm pretty sure that deleting an item deletes all of its children.
    
    	Of course, if you used the 32-bit value (see GetItemData) to
    	point to some data structure of your own, then you'll have to
    	clean those up yourself. If you don't use the item data, then
    	no worries.
    
    Cheers,
    Paul