Skip to content

Commit

Permalink
Zero-fill memory allocated for CArrays
Browse files Browse the repository at this point in the history
  • Loading branch information
raydiak committed Feb 16, 2015
1 parent a5665f1 commit ead7622
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -168,6 +168,7 @@ private void expand(ThreadContext tc, long new_size) {

if (managed) {
Memory new_storage = new Memory(new_size*repr_data.jna_size);
new_storage.clear();
if (storage != null) {
Memory old_storage = (Memory) storage;
new_storage.write(0, old_storage.getByteArray(0, (int) old_storage.size()), 0, (int) old_storage.size());
Expand Down

0 comments on commit ead7622

Please sign in to comment.