aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m12
1 files changed, 9 insertions, 3 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index 683cda7d..c4d41778 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -1877,10 +1877,16 @@ void performThreadedKeepAlive(void *ptr)
connectionID = @"_";
// Re-init with already cached data from navigator controller
+ NSDictionary *dbstructure = [[[self delegate] getDbStructure] retain];
[structure removeAllObjects];
- [structure setObject:[NSMutableDictionary dictionaryWithDictionary:[[self delegate] getDbStructure]] forKey:connectionID];
- [allKeysofDbStructure removeAllObjects];
- [allKeysofDbStructure addObjectsFromArray:[[self delegate] allSchemaKeys]];
+ [structure setObject:[NSMutableDictionary dictionaryWithDictionary:dbstructure] forKey:connectionID];
+ NSArray *allStructureKeys = [[[self delegate] allSchemaKeys] retain];
+ if(allStructureKeys && [allStructureKeys count]) {
+ [allKeysofDbStructure removeAllObjects];
+ [allKeysofDbStructure addObjectsFromArray:allStructureKeys];
+ }
+ if(allStructureKeys) [allStructureKeys release], allStructureKeys = nil;
+ if(dbstructure) [dbstructure release], dbstructure = nil;
BOOL removeAddFlag = NO;