diff options
author | Jason Sams <rjsams@android.com> | 2009-09-25 14:51:22 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-09-25 14:51:22 -0700 |
commit | e514b45de8561fbc6ef6770845102ca10b0a69d7 (patch) | |
tree | 572fdc8b1dbc14b53c61f9c81f90fbc642024b45 /rsComponent.cpp | |
parent | 86f1b23aaaf9b8822a009d8c3e585e46768abb6a (diff) | |
download | rs-e514b45de8561fbc6ef6770845102ca10b0a69d7.tar.gz |
Improve renderscript context teardown. Track object in the system and then force their cleanup by releasing all user references once destroy context is called. Java layer will no longer send destroy notifications for objects garbage collected once a context is destroyed.
Diffstat (limited to 'rsComponent.cpp')
-rw-r--r-- | rsComponent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rsComponent.cpp b/rsComponent.cpp index 4a043f3b..67184ffa 100644 --- a/rsComponent.cpp +++ b/rsComponent.cpp @@ -21,7 +21,7 @@ using namespace android; using namespace android::renderscript; -Component::Component() +Component::Component(Context *rsc) : ObjectBase(rsc) { mType = FLOAT; mKind = USER; @@ -29,9 +29,9 @@ Component::Component() mBits = 0; } -Component::Component( +Component::Component(Context *rsc, DataKind dk, DataType dt, - bool isNormalized, uint32_t bits, const char * name) + bool isNormalized, uint32_t bits, const char * name) : ObjectBase(rsc) { mType = dt; mKind = dk; |