473,378 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 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 1015
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Scott | last post by:
I have a collection where the items in the collection are dates. I want to iterate over the collection and build a value list string for the rowsource of a listbox. The dates in the collection are...
10
by: aa7im | last post by:
I have a similiar thread going about this topic but I decided to break it off into a seperate discussion. Question: What is the best way to determine if an object "IsNew" to a collection? ...
6
by: Mel | last post by:
I have a large collection of custom objects, each representing a period in time with each having a start datetime and an end datetime. I frequently need to query this collection to return a subset...
3
by: JJ | last post by:
Hi, I noticed in a sample app source code that the app made use of a class for example a user class and then had the user objects that got created stuffed into a user collection. I was wondering...
5
by: | last post by:
Trying to learn about manipulating collections of objects, and populating these objects dynamically from datasources. Could someone post a code sample that shows the following: Instantiating a...
1
by: Pi | last post by:
I'm looking at a piece of code that gets called over 100,000 times and was wondering if there would be much performance difference between these three scenarios or is there an alternate approach?:...
10
by: Chet Cromer | last post by:
I am creating a set of base classes and sub classes to use throughout a program I'm developing. The base class represents a generic "lookup table" from my database that contains lists of things...
3
by: Dave | last post by:
Please - anyone that can help. I am getting confusing results while trying to expose a collection from a web service. I have a webservice in which a web method accepts a collection as a...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
158
by: pushpakulkar | last post by:
Hi all, Is garbage collection possible in C++. It doesn't come as part of language support. Is there any specific reason for the same due to the way the language is designed. Or it is...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.