[ 
https://issues.apache.org/jira/browse/CALCITE-2778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16737485#comment-16737485
 ] 

BELUGA BEHR commented on CALCITE-2778:
--------------------------------------

[~julianhyde] Ha.  Interesting that it's not even used.  May I simply remove it?

I am interested in the Calcite project and just starting to look it over a 
little bit as a n00b.  I just popped open a few files to check things out and 
noticed that this class is a bit cumbersome and could be tightened up (less is 
more).

In regards to the 'set null'.  The call to {{removeLast()}}  simply removes the 
item from the collection so that it is no longer discover-able, instead of 
{{clear()}} the list at the end.  If concurrency is a real problem, then it 
would be best to synchronize the calls and protect the collection.  Though, all 
of this is moot if it's not even used anymore.

> CompoundClosableAllocation Prefer ArrayList
> -------------------------------------------
>
>                 Key: CALCITE-2778
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2778
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: BELUGA BEHR
>            Assignee: Julian Hyde
>            Priority: Minor
>
> In Java, ArrayList should be the default choice over LinkedList.  It 
> generally requires less memory and is faster.  Update 
> {{CompoundClosableAllocation}} to use an Array structure instead of linked 
> list and simplify the code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to