Skip to content

Commit

Permalink
Merge pull request #8 from Tightdb/objc_leakage_fix
Browse files Browse the repository at this point in the history
Fix for memory leakage when typed tables are created in a group.
  • Loading branch information
jjepsen committed Oct 8, 2013
2 parents d6399fc + 29ad189 commit 445d9e3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tightdb/objc/group_objc.mm
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,7 @@ -(id)getTable:(NSString *)name withClass:(__unsafe_unretained Class)classObj err
if (TIGHTDB_UNLIKELY(!table)) return nil;
bool was_created;
TIGHTDB_EXCEPTION_ERRHANDLER(
tightdb::TableRef r = tightdb::LangBindHelper::get_table_ptr(_group, ObjcStringAccessor(name),
was_created)->get_table_ref();
[table setTable:move(r)];
[table setTable:_group->get_table(ObjcStringAccessor(name), was_created)];
, @"com.tightdb.group", nil);
[table setParent:self];
[table setReadOnly:_readOnly];
Expand Down

0 comments on commit 445d9e3

Please sign in to comment.