Home All Groups Group Topic Archive Search About

Instances of class at runtime

Author
7 Nov 2006 6:41 PM
Naresh Mirkhelkar
Hi,
Can someone please let me know if, during runtime, without using any counter
in a class (say class constructor), is it possible to find the number of
instances of a particular class (class objects) created and are not garbage
collected?
Thanks,
Naresh

Author
7 Nov 2006 7:53 PM
Mattias Sjögren
>Can someone please let me know if, during runtime, without using any counter
>in a class (say class constructor), is it possible to find the number of
>instances of a particular class (class objects) created and are not garbage
>collected?

Not from within the managed code itself. It may be possible with the
native profiling and/or debugging APIs.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

AddThis Social Bookmark Button