Board index » cppbuilder » ListBox->Items->AddObject but how to delete?
Markcr
![]() CBuilder Developer |
ListBox->Items->AddObject but how to delete?2005-08-05 05:34:26 PM cppbuilder19 Hi, I don't know if this is even an issue but I would like help clearing it from my mind. I use a TListBox component and to it use the following type of staement int nMyReference; // This is then assigned a value somwhere else ListBox1->Items->AddObject("My Item Name", (TObject *) nMyReference); I can happily get to the nMyReference and do what I need, but on reading about AddObject in the help files, it suggests that objects are not destroyed when the ListBox is destroyed. If this is the case, how do I then destroy the objects I have created? cheers |