use shared_ptr for device, cache

git-svn-id: https://profuse.googlecode.com/svn/branches/v2@345 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
ksherlock
2011-02-22 02:59:33 +00:00
parent 8e259ef1f2
commit 78d35bba08
17 changed files with 80 additions and 36 deletions
+2 -2
View File
@@ -218,11 +218,11 @@ void DiskCopy42Image::write(unsigned block, const void *bp)
}
BlockCache *DiskCopy42Image::createBlockCache()
BlockCachePointer DiskCopy42Image::createBlockCache()
{
// if not readonly, mark changed so crc will be updated at close.
if (!readOnly()) _changed = true;
return new MappedBlockCache(this, address());
return MappedBlockCache::Create(shared_from_this(), address());
}