|
-
Aug 17th, 2003, 06:36 AM
#1
Thread Starter
Lively Member
Class object collection?
Can someone tell me what is the best way to create
a collection of objects from classes?
I tried using the component container like it is made
when using components in VS, but it doesn't work.
Code:
this.components = new System.ComponentModel.Container();
this.myClass = new theClass(this.components);
The reason I want this is to be able to dispose the
objects created.
-
Aug 17th, 2003, 06:58 AM
#2
Thread Starter
Lively Member
Or is there perhaps a Global Event one can create.
Like a Global_Dispose which runs on all objects when called.
-
Aug 17th, 2003, 11:31 AM
#3
PowerPoster
I don't understand what you are trying to do. If the objects go out of scope, then the built in garbage collector will take care of them. You don't need to do anything. If an object is a huge resource hog, then you should call it's dispose method, and maybe do a forced garbage collection.
-
Aug 17th, 2003, 12:45 PM
#4
Thread Starter
Lively Member
Well I am trying to make a server app which can have multiple
threads and it has plugins. When a session/thread ends it
should dispose the objects/plugins that it used during the
session. This is what I'm trying to do.
What kind of collection should I use for the plugin objects to
be able to dispose them?
-
Aug 17th, 2003, 01:15 PM
#5
Sleep mode
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|