summaryrefslogtreecommitdiff
path: root/rsFileA3D.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-09-25 14:51:22 -0700
committerJason Sams <rjsams@android.com>2009-09-25 14:51:22 -0700
commite514b45de8561fbc6ef6770845102ca10b0a69d7 (patch)
tree572fdc8b1dbc14b53c61f9c81f90fbc642024b45 /rsFileA3D.cpp
parent86f1b23aaaf9b8822a009d8c3e585e46768abb6a (diff)
downloadrs-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 'rsFileA3D.cpp')
-rw-r--r--rsFileA3D.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/rsFileA3D.cpp b/rsFileA3D.cpp
index 347ef232..c566665a 100644
--- a/rsFileA3D.cpp
+++ b/rsFileA3D.cpp
@@ -242,7 +242,7 @@ void FileA3D::IO::loadString(String8 *s)
void FileA3D::processChunk_Mesh(Context *rsc, IO *io, A3DIndexEntry *ie)
{
- Mesh * m = new Mesh;
+ Mesh * m = new Mesh(rsc);
m->mPrimitivesCount = io->loadU32();
m->mPrimitives = new Mesh::Primitive_t *[m->mPrimitivesCount];