summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsAllocation.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-10-21 14:06:55 -0700
committerJason Sams <rjsams@android.com>2010-10-21 21:17:30 -0700
commitb38d534873ca514f5a5230596c838aa37eca1568 (patch)
tree4473cccf239e0a97597db92052508b2149309ad1 /libs/rs/rsAllocation.cpp
parent4924aee9cb1c5988359f3162b6e89689c5b101e1 (diff)
downloadframeworks_base-b38d534873ca514f5a5230596c838aa37eca1568.zip
frameworks_base-b38d534873ca514f5a5230596c838aa37eca1568.tar.gz
frameworks_base-b38d534873ca514f5a5230596c838aa37eca1568.tar.bz2
Fix refcounting bugs where the sys refcount
could be corrupted during async type creation. Change-Id: If42828e92990598b0cb5da81c82ea513f94725f2 Fix stack object deletion bug. Change-Id: I2c723aa5ad15e0c99dc9cd0cfbc7db80bace172a
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
-rw-r--r--libs/rs/rsAllocation.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 6748bb4..fc41a72 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -57,8 +57,6 @@ Allocation::Allocation(Context *rsc, const Type *type, void *bmp,
void Allocation::init(Context *rsc, const Type *type)
{
- mAllocFile = __FILE__;
- mAllocLine = __LINE__;
mPtr = NULL;
mCpuWrite = false;
@@ -478,7 +476,7 @@ Allocation *Allocation::createFromStream(Context *rsc, IStream *stream)
uint32_t dataSize = stream->loadU32();
if(dataSize != type->getSizeBytes()) {
LOGE("failed to read allocation because numbytes written is not the same loaded type wants\n");
- delete type;
+ ObjectBase::checkDelete(type);
return NULL;
}