Aug 2, 2012 at 2:11am Aug 2, 2012 at 2:11am UTC
Hi,
I'm writing a windows form application in which a have a
listBox Object. In first it's empty. To add items I just say:
myForm->myListBox->Items->Add(gcnew Object());
more specifically:
1 2
Object^ myObj = gcnew Object();
myForm->myListBox->Items->Add(myObj);
Now the question, propably a noob's one:
Do I have to worry about the "gcnew" Objects I create just
like the "new" Objects and delete them when the program closes?
Last edited on Aug 2, 2012 at 2:13am Aug 2, 2012 at 2:13am UTC
Aug 2, 2012 at 10:41am Aug 2, 2012 at 10:41am UTC
Perfect!
This is available only C++/CLI or I can use it and with C++?
Aug 2, 2012 at 10:46am Aug 2, 2012 at 10:46am UTC
You cannot use it in C++.