What is the proper way to release an array that you created with copy? I have a function createDoc that takes an NSMutableArray as an argument. I get a memory leak because I believe copy allocates memory.
doc = [getDoc createDoc: [[array subarrayWithRange:NSMakeRange(2, 5)] copy] ];
Try this
or even better this