diff options
author | Conley Owens <cco3@android.com> | 2011-04-29 10:24:08 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-04-29 10:24:08 -0700 |
commit | 718516f3b73468c480ef8d2283a1c80a6223658d (patch) | |
tree | dc8b93194b963d4726aebb9845a8640c1259054b /core | |
parent | fbe9bcf4af5427e01d51210e03067eb55cfff86a (diff) | |
parent | 9fd8e0579fb3306f61ba1716b1977562ae3626e1 (diff) | |
download | frameworks_base-718516f3b73468c480ef8d2283a1c80a6223658d.zip frameworks_base-718516f3b73468c480ef8d2283a1c80a6223658d.tar.gz frameworks_base-718516f3b73468c480ef8d2283a1c80a6223658d.tar.bz2 |
am 9fd8e057: Merge "Fix memory leak of SkMovie class"
* commit '9fd8e0579fb3306f61ba1716b1977562ae3626e1':
Fix memory leak of SkMovie class
Diffstat (limited to 'core')
-rw-r--r-- | core/jni/android/graphics/Movie.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/jni/android/graphics/Movie.cpp b/core/jni/android/graphics/Movie.cpp index de18f9f..d1a5546 100644 --- a/core/jni/android/graphics/Movie.cpp +++ b/core/jni/android/graphics/Movie.cpp @@ -115,6 +115,10 @@ static jobject movie_decodeByteArray(JNIEnv* env, jobject clazz, return create_jmovie(env, moov); } +static void movie_destructor(JNIEnv* env, jobject, SkMovie* movie) { + delete movie; +} + ////////////////////////////////////////////////////////////////////////////////////////////// #include <android_runtime/AndroidRuntime.h> @@ -129,6 +133,7 @@ static JNINativeMethod gMethods[] = { (void*)movie_draw }, { "decodeStream", "(Ljava/io/InputStream;)Landroid/graphics/Movie;", (void*)movie_decodeStream }, + { "nativeDestructor","(I)V", (void*)movie_destructor }, { "decodeByteArray", "([BII)Landroid/graphics/Movie;", (void*)movie_decodeByteArray }, }; |