aybekckaya / sqlitepersistentobjects

Automatically exported from code.google.com/p/sqlitepersistentobjects
0 stars 1 forks source link

Leak in +[NSMutableData initWithSQLBlobRepresentation:] #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
@implementation NSMutableData(SQLitePersistence)
- (id)initWithSQLBlobRepresentation:(NSData *)data
{
    self = [[NSMutableData dataWithData:data] retain];
    return self;
}
@end

In this method, the original +[self alloc] call is not balanced by a 
corresponding release. The 
assignment of self causes this.

Fix:

- (id)initWithSQLBlobRepresentation:(NSData *)data
{
    return [self initWithData:data];
}

Original issue reported on code.google.com by j.p.dann on 23 Jan 2009 at 3:11

GoogleCodeExporter commented 8 years ago
I added your fix to the codeline tonight - thank you.

Original comment by jeff.lam...@gmail.com on 19 Feb 2009 at 1:42