OSDN Git Service
(root)
/
android-x86
/
art.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a421e9e
)
Hold a ClassLoader reference in NativeAllocationRegistry.
author
Richard Uhler
<ruhler@google.com>
Tue, 3 May 2016 20:05:50 +0000
(13:05 -0700)
committer
Richard Uhler
<ruhler@google.com>
Tue, 3 May 2016 20:05:50 +0000
(13:05 -0700)
So that the native library isn't unloaded before we have a chance to
call the freeFunction.
Bug:
28406866
Change-Id: Iafe4fdc68482b68a4b14d10880fa15dcbb65adf2
tools/ahat/test-dump/Main.java
patch
|
blob
|
history
diff --git
a/tools/ahat/test-dump/Main.java
b/tools/ahat/test-dump/Main.java
index
d61a98d
..
3936f29
100644
(file)
--- a/
tools/ahat/test-dump/Main.java
+++ b/
tools/ahat/test-dump/Main.java
@@
-50,7
+50,8
@@
public class Main {
bigArray[i] = (byte)((i*i) & 0xFF);
}
- NativeAllocationRegistry registry = new NativeAllocationRegistry(0x12345, 42);
+ NativeAllocationRegistry registry = new NativeAllocationRegistry(
+ Main.class.getClassLoader(), 0x12345, 42);
registry.registerNativeAllocation(anObject, 0xABCDABCD);
}
}