Hello,
I have created a program and are cleaning up in order to not create any memory-leaks. Since I am a beginner I made some incorrect decisions in the beginning when I started creating this application, which I do in order to learn how to develop Objective-C/Cocoa-applications. I'm also new to C...
I did create a C-2Darray (MyObject *myObjArr[x][y]
with known x- and y-values. The objects are my own custom objects. The objects are created like [[MyObject alloc] init];
Now, I am not sure how to realease the memory since it is a mixture of C and Objective-C. I know that Objective-C is a superset of C, but still not sure about the proper way of handling the freeing of memory.
Should I
1. Loop through all objects and do [myObjArr[x][y] release];
2. delete [][] bric2 [x]; //For each x
3. delete [] bric2;
Thanks in advance!
I have created a program and are cleaning up in order to not create any memory-leaks. Since I am a beginner I made some incorrect decisions in the beginning when I started creating this application, which I do in order to learn how to develop Objective-C/Cocoa-applications. I'm also new to C...
I did create a C-2Darray (MyObject *myObjArr[x][y]
Now, I am not sure how to realease the memory since it is a mixture of C and Objective-C. I know that Objective-C is a superset of C, but still not sure about the proper way of handling the freeing of memory.
Should I
1. Loop through all objects and do [myObjArr[x][y] release];
2. delete [][] bric2 [x]; //For each x
3. delete [] bric2;
Thanks in advance!