Skip to content

Commit

Permalink
fix(java): Fix memory leak in StructSerializer.xread() caused by re…
Browse files Browse the repository at this point in the history
…-pushing instead of popping `GenericType`. (#1768)

## What does this PR do?

Fix memory leak in `StructSerializer.xread()` caused by re-pushing
instead of popping `GenericType`.

## Related issues

None, probably.

## Does this PR introduce any user-facing change?

- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?

## Benchmark

N/A
  • Loading branch information
komamitsu authored Jul 27, 2024
1 parent 33eef02 commit beb0797
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public T xread(MemoryBuffer buffer) {
Object fieldValue = fury.xreadRefByNullableSerializer(buffer, serializer);
fieldAccessor.set(obj, fieldValue);
if (hasGenerics) {
generics.pushGenericType(fieldGeneric);
generics.popGenericType();
}
}
return obj;
Expand Down

0 comments on commit beb0797

Please sign in to comment.