This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
|Summary:||FacesDesignProperty objects retain redundant Boolean instances|
|Product:||obsolete||Reporter:||Quy Nguyen <quynguyen>|
|Component:||visualweb||Assignee:||_ sandipchitale <sandipchitale>|
|Issue Type:||DEFECT||Exception Reporter:|
Description Quy Nguyen 2007-12-06 19:45:19 UTC
From the HeapWalker analysis of a heap dump, FacesDesignProperty objects seem to hold onto redundant objects of type Boolean in the 'initialValue' field. There should only be two instances of Boolean (Boolean.TRUE and Boolean.FALSE). This is a minor waste of memory.
Comment 1 _ sandipchitale 2007-12-06 23:21:27 UTC
I think this is because that value is used as a key in the hashtable...not sure though.
Comment 2 Quy Nguyen 2007-12-06 23:48:31 UTC
That shouldn't make a difference, since Boolean.hashCode() only has two possible return values, based on whether the object represents true or false (see hashCode() javadoc for the Boolean class).
Comment 3 _ sandipchitale 2007-12-07 18:32:42 UTC
You are right. I meant to say that the == is used somewhere to detect distinct values. I need to check on it.