title: Why is Core Data shm file not removed in journal_mode DELETE?
body: <p>I'm using the following code to to consolidate my Core Data sqlite store files, which current consists of the database itself, a -wal and a -shm file. I am doing this so I can manipulate it as a single file using NSFileManager. </p>
  
  <pre><code>NSPersistentStoreCoordinator *tmpPSC = [[NSPersistentStoreCoordinator alloc] 
        initWithManagedObjectModel...];
  
  NSDictionary *options = @{NSSQLitePragmasOption: 
                          @{@"journal_mode": @"DELETE"}};
  
  NSPersistentStore *persistentStore = [tmpPSC 
     addPersistentStoreWithType:NSSQLiteStoreType configuration:nil 
     URL:storeURL options:options error:NULL];
  
  if (persistentStore) {
     [tmpPSC removePersistentStore:persistentStore error:NULL];
     tmpPSC = nil;
  }
  </code></pre>
  
  <p>However, after the above code execute, I am seeing the -wal file disappear, but the -shm file is still there.</p>
  
  <p>Any idea why this is so?</p>