471,317 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

A collection of Objects?

RSH

Is there a way to iterate through all of the active objects in memory? Or
do I need to add the objects to a collection upon instantiation and do it
that way?

Ron
Dec 15 '05 #1
5 985
What are you trying to accomplish with this?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"RSH" <wa*************@yahoo.com> wrote in message
news:O0**************@TK2MSFTNGP12.phx.gbl...

Is there a way to iterate through all of the active objects in memory? Or
do I need to add the objects to a collection upon instantiation and do it
that way?

Ron

Dec 15 '05 #2
RSH
I can tell by your response that this is not a recommended practice.

I will look for a better approach.
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:OO****************@TK2MSFTNGP15.phx.gbl...
What are you trying to accomplish with this?

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"RSH" <wa*************@yahoo.com> wrote in message
news:O0**************@TK2MSFTNGP12.phx.gbl...

Is there a way to iterate through all of the active objects in memory?
Or do I need to add the objects to a collection upon instantiation and do
it that way?

Ron


Dec 15 '05 #3
Hi,
"RSH" <wa*************@yahoo.com> wrote in message
news:O0**************@TK2MSFTNGP12.phx.gbl...

Is there a way to iterate through all of the active objects in memory? Or
do I need to add the objects to a collection upon instantiation and do it
that way?


No, the GC does ont provide nothing that let you iterate through all the
objects currently instantiated in the heap ( not even speaking of those in
the stack )

What are you trying to do?

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Dec 15 '05 #4
"RSH" <wa*************@yahoo.com> a écrit dans le message de news:
O0**************@TK2MSFTNGP12.phx.gbl...

| Is there a way to iterate through all of the active objects in memory? Or
| do I need to add the objects to a collection upon instantiation and do it
| that way?

You would never want to iterate through *all* the active objects in memory,
that would *really* take some time :-))

If you want to iterate through all the objects of one particular type, then
that would make more sense and, yes you would add them to a collection
rather than having a vast number lying around in disparate places in your
code; some of which could well be out of scope to the place that you want to
iterate them from.

What kind of reason do you have in mind for wanting to do this ?

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Dec 15 '05 #5
Well, if you could tell us your requreiments, we could suggest some possible
solutions.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"RSH" <wa*************@yahoo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I can tell by your response that this is not a recommended practice.

I will look for a better approach.
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:OO****************@TK2MSFTNGP15.phx.gbl...
What are you trying to accomplish with this?

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"RSH" <wa*************@yahoo.com> wrote in message
news:O0**************@TK2MSFTNGP12.phx.gbl...

Is there a way to iterate through all of the active objects in memory?
Or do I need to add the objects to a collection upon instantiation and
do it that way?

Ron



Dec 15 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Scott | last post: by
10 posts views Thread by aa7im | last post: by
3 posts views Thread by JJ | last post: by
1 post views Thread by Pi | last post: by
19 posts views Thread by Jamey Shuemaker | last post: by
158 posts views Thread by pushpakulkar | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.