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
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 6748bb4..fc41a722 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -57,8 +57,6 @@
void Allocation::init(Context *rsc, const Type *type)
{
- mAllocFile = __FILE__;
- mAllocLine = __LINE__;
mPtr = NULL;
mCpuWrite = false;
@@ -478,7 +476,7 @@
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;
}