0

I have a memory leak problem using OData where data retrieved from the OData web service is returned in an NSMutableArray, i.e. return [response getResult], and then stored using NSKeyedArchiver as follows:

QueryOperationResponse *response = [dropDownQuery execute];

...

NSData *data = [NSKeyedArchiver archivedDataWithRootObject:[response getResult]];

When I run the Memory Leak Instrument from Xcode, I am getting a lot of leaks on the NSKeyedArchiver line.

I am thinking that I need to some how make sure that the data retrieved from OData and returned in the NSMutableArray complies with the NSCoding protocol? The data I am getting back are just strings and integers.

Can I please have some help with this and if anyone has any suggestions on making any objects in NSMutableArray comply with NSCoding, that would be great.

Felipe Sabino
  • 17,825
  • 6
  • 78
  • 112
user1522318
  • 83
  • 1
  • 8

1 Answers1

-1

The fix is to modify the proxy class created from OData as it needs to be modified to comply with the NSCoding protocol.

user1522318
  • 83
  • 1
  • 8