diff options
author | Jason Sams <rjsams@android.com> | 2010-10-21 14:06:55 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-10-21 21:17:30 -0700 |
commit | 225afd317e101a7be5fe02c0a86361146ea89f05 (patch) | |
tree | af9ed039287d6a03a6442eb8c8d332f97d0f6e48 /rsProgramStore.cpp | |
parent | 1c94845e04e974b22edf07d21ca03337bfb23b7c (diff) | |
download | rs-225afd317e101a7be5fe02c0a86361146ea89f05.tar.gz |
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 'rsProgramStore.cpp')
-rw-r--r-- | rsProgramStore.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/rsProgramStore.cpp b/rsProgramStore.cpp index 586a89fd..876299f7 100644 --- a/rsProgramStore.cpp +++ b/rsProgramStore.cpp @@ -33,8 +33,6 @@ using namespace android::renderscript; ProgramStore::ProgramStore(Context *rsc) : Program(rsc) { - mAllocFile = __FILE__; - mAllocLine = __LINE__; mDitherEnable = true; mBlendEnable = false; mColorRWriteEnable = true; @@ -236,8 +234,8 @@ ProgramStoreState::ProgramStoreState() ProgramStoreState::~ProgramStoreState() { - delete mPFS; - + ObjectBase::checkDelete(mPFS); + mPFS = NULL; } void ProgramStoreState::init(Context *rsc) @@ -258,9 +256,8 @@ namespace renderscript { void rsi_ProgramStoreBegin(Context * rsc, RsElement in, RsElement out) { - delete rsc->mStateFragmentStore.mPFS; + ObjectBase::checkDelete(rsc->mStateFragmentStore.mPFS); rsc->mStateFragmentStore.mPFS = new ProgramStore(rsc); - } void rsi_ProgramStoreDepthFunc(Context *rsc, RsDepthFunc func) |