Nandor Kollar commented on AVRO-2050:

I'm wondering why {{clear()}} method is in overridden. It looks like the base 
class is AbstractList, which has clear method implemented correctly, so we 
might instead implement the {{Array}} iterator's {{remove()}} method no?

> Clear Array To Allow GC
> -----------------------
>                 Key: AVRO-2050
>                 URL: https://issues.apache.org/jira/browse/AVRO-2050
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.7.7, 1.8.2
>            Reporter: BELUGA BEHR
>            Priority: Minor
>         Attachments: AVRO-2050.1.patch
> Java's {{ArrayList}} implementation clears all Objects from the internal 
> buffer when the {{clear()}} method is called.  This allows the Objects to be 
> free for GC.  We should do the same in Avro 
> {{org.apache.avro.generic.GenericData}} 
> [ArrayList 
> Source|http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/util/ArrayList.java#ArrayList.clear%28%29]

This message was sent by Atlassian JIRA

Reply via email to