CBForest.Native.c4db_delete C# (CSharp) Method

c4db_delete() public static method

Closes the database, deletes the file, and frees the object
public static c4db_delete ( C4Database db, C4Error outError ) : bool
db C4Database The DB object to delete
outError C4Error The error that occurred if the operation doesn't succeed
return bool
        public static bool c4db_delete(C4Database *db, C4Error *outError)
        {
            #if DEBUG
            var ptr = (IntPtr)db;
            #if ENABLE_LOGGING
            if(ptr != IntPtr.Zero && !_AllocatedObjects.ContainsKey(ptr)) {
                Console.WriteLine("WARNING: [c4db_delete] freeing object 0x{0} that was not found in allocated list", ptr.ToString("X"));
            } else {
            #endif
                _AllocatedObjects.Remove(ptr);
            #if ENABLE_LOGGING
            }
            #endif
            #endif
            return _c4db_delete(db, outError);
        }
        
Native