fencerj / sqlitepersistentobjects

sqlitepersistentobjects --- A Sqlite ORM Framework
0 stars 0 forks source link

Memory leak in SQLPersistentObject.m, row 255? #71

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is the code of SQLitePersistentObject.m, row 251-257:

251: SQLitePersistentObject *testObject = [objectMap objectForKey:mapKey];
252: if (testObject != nil)
253: {
254:  [oneItem release];
255:  [ret addObject: [testObject retain] ];
256:  foundInMemory = YES;
257: }

I think that the 'retain' is unnecessary, and it leads to a memory leak.

Hope this helps,

V.

Original issue reported on code.google.com by vdu...@gmail.com on 10 Jun 2009 at 10:02