Opened 8 years ago

#319 new refactoring

don't use finalizables in kona (java) code

Reported by: Fred T. Hamster Owned by:
Priority: minor Milestone:
Component: feistymeow-kona Version:
Keywords: java, finalizable Cc:

Description

stop using finalizables... they hose up the gc like crazy. extra maintenance, slower, etc etc.

use more immutable holders, where the referenced object is final. this causes old objects to be linked to other old objects, rather than in mutable case where an old object can be changed to point to a new object. when that happens, much following of old crud must occur to make sure things are updated. with immutable version, that update cannot happen. old object just goes away.
example:

public class ImmutableHolder {

private final Object value;
public ImmutableHolder(Object o) { value = o; }
public Object getValue() { return value; }

}

...=> reference article would be nice.

Change History (0)

Note: See TracTickets for help on using tickets.