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.
If the array is initially allocated by Array.newInstance(), those allocations are not tracked. Once the array is allocated by ordinary new A[1] expression, subsequect allocation via Array.newInstance() are tracked. See simple test case below: package allocref; import java.lang.reflect.Array; public class Allocref { public static void main(String[] args) { Allocref r = new Allocref(); r.test(); } private void test() { for (int i=0; i<100; i++) { Allocref[] arr = (Allocref[]) Array.newInstance(Allocref.class, 1); arr[0] = new Allocref(); } } } in this example allocref.Allocref[] instances are not tracked. If the test case is changed to: package allocref; import java.lang.reflect.Array; public class Allocref { public static void main(String[] args) { Allocref r = new Allocref(); r.test(); } private void test() { Allocref[] a = new Allocref[1000]; for (int i=0; i<100; i++) { Allocref[] arr = (Allocref[]) Array.newInstance(Allocref.class, 1); arr[0] = new Allocref(); } } } [note the change in the first line of the test() method]. Everything works fine and allocref.Allocref[] instances are tracked by profiler.
Fixed in profiler-main changeset: 273718:c6bc270a3171 user: Tomas Hurka <thurka@netbeans.org> date: Thu May 15 12:47:49 2014 +0200 summary: bugfix #244500, set instrclassId for array class, but only if it is not already set
Integrated into 'main-silver', will be available in build *201405151825* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/c6bc270a3171 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #244500, set instrclassId for array class, but only if it is not already set