Hi,

I have raised a bug in GitHub for that issue.I am using couchbase 1.0 beta3 
release.If i dont create a copy of CBLManager at all and try to delete the 
database ,its working cool.
Similarly if i try to delete the database (database from cblmanager's copy 
)in the same thread it is created , it is deleting. But if i create a 
copy,does some update functionality using the database from the manager's 
copy , then closing the manager once its done, and if try to delete the 
database (database from sharedinstance ) after switching to main thread , i 
am getting a warning 

 WARNING*** : <CBL_Shared: 0xa283d00>: Still waiting to 
-forgetDatabaseNamed: "couchblite"

code snippet for your reference : (modified the sample HElloCBL project)
- (BOOL) sayHello {
    
    // create a database
    if (![self createDataBase:@"my-new-database"]) return NO;
    
    // create a new document & save it in the database
    if (![self createTheDocument]) return NO;

    // retrieve a document from the database
    if (![self retrieveTheDocument]) return NO;
    
   [NSThread detachNewThreadSelector:@selector(test) toTarget:self 
withObject:nil];
    
    
    return YES;
    
}

-(void)test{
    CBLManager *manager=[[CBLManager sharedInstance]copy];
    CBLDatabase *database=[manager databaseNamed:@"my-new-database" 
error:nil];
    [self updateTheDocument:database];
    [database.manager close];
    [self performSelectorOnMainThread:@selector(deleteDatabase) 
withObject:nil waitUntilDone:YES];
    
}

-(void)deleteDatabase{
    if ([_database deleteDatabase:nil]) {
        NSLog(@"you have done it !!!!");
    }
    
}


I have put so many attempts, all ended in vain.Though i am closing the 
manager's copy, still why i am not able to delete it ? 

Please help me out. Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/e3dff84e-45f4-40f3-8c14-05792e523f1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to