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.

Bug 62476 - Capture instances created dynamically using newInstance() in memory profiling
Summary: Capture instances created dynamically using newInstance() in memory profiling
Status: VERIFIED DUPLICATE of bug 71792
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
: 62438 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-17 12:26 UTC by fuege
Modified: 2007-11-14 16:26 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Simple test case using explicit and dynamic object generation. (1.40 KB, text/plain)
2005-08-17 12:28 UTC, fuege
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fuege 2005-08-17 12:26:43 UTC
Using the profiler's "Analyze Memory Usage|Record Object Creation| Track every 
1 object allocation" to profile my GUI apps, I don't see instances of 
dynamically allocated objects using something like: MyObj o = (MyOjb) 
getConstructor().newInstance().

See the attached test case, creating objects of the same class explicitly and 
dynamically. Additionally I integrated a listener to see the anonymous class 
instance(s).

Result:
You'll see two anonymous instances (MyObj$1) but only one main instance (MyObj).

Maybe those dynamically generated instances are filed under java.lang.Object 
(?!), but that's not very useful.
Comment 1 fuege 2005-08-17 12:28:03 UTC
Created attachment 23987 [details]
Simple test case using explicit and dynamic object generation.
Comment 2 iformanek 2005-10-21 15:42:59 UTC
I am going to investigate right away, thanks for attaching the test app.
Comment 3 iformanek 2005-10-21 17:34:44 UTC
Indeed, the profiler does not record instances created dynamically.
Both 1.4 and 1.5 (vararg) type creation is not tracked.
Comment 4 iformanek 2005-11-22 18:09:18 UTC
*** Issue 62438 has been marked as a duplicate of this issue. ***
Comment 5 iformanek 2005-12-01 15:44:13 UTC
Changed to feature for 2.0
Comment 6 Tomas Hurka 2007-08-08 08:34:28 UTC
Already fixed for NB 6.0 beta1

*** This issue has been marked as a duplicate of 71792 ***
Comment 7 Alexander Kouznetsov 2007-11-14 16:26:30 UTC
Verified duplicate