Rick Posted August 10, 2010 Share Posted August 10, 2010 Does anyone know if there is a way to get all created objects? Like let's say for example I instantiate a class, instead of me storing it off, is there a way with the framework to get a list of objects that are created and in scope? Ideally I want to be able to loop through a list of all created objects and see if they are of a certain type. I just don't want to have to store this list myself and if there is a way to get the data with the framework them that would be ideal. Quote Link to comment Share on other sites More sharing options...
TylerH Posted August 11, 2010 Share Posted August 11, 2010 There will be. We are trying to tie into getting the TLists stored in the world object, if that doesn't work, we will store a hashtable of created objects, or maybe a more efficient container. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Rick Posted August 11, 2010 Author Share Posted August 11, 2010 I actually meant in any generic .NET application. There must be a way to get all and any objects create since the garbage collector knows when to free an object, it must have a list somewhere. Quote Link to comment Share on other sites More sharing options...
TylerH Posted August 11, 2010 Share Posted August 11, 2010 Ah, the garbage collector has a generation list of objects, but it isn't publicly visible. It is a private internal member in the GC class. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Rick Posted August 11, 2010 Author Share Posted August 11, 2010 There must be a way to hack around this, so we can have access to all objects created (without storing it ourselves). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.