|
-
Aug 20th, 2000, 11:44 AM
#1
Thread Starter
New Member
I'm making a program that does various things in a complicated way and there's a a bug 
I'm using a lot of modules which get used, then left alone for a long time, some of these modules use class modules, but a lot of the time instances of these classes are left open after the module is finished with.
I don't want to change the whole structure of my program to close them but I do want them closed.
Can I get a collection or something of all instances of a certain class so I can just loop through and close them.
-
Aug 20th, 2000, 12:01 PM
#2
Junior Member
If you implement a common inferface with all of the classes, shouldn't you be able to do just that?
-
Aug 20th, 2000, 01:29 PM
#3
Thread Starter
New Member
I don't understand. I need to be able to close all instances of a class, how will making the the interfaces of different classes the same help?
-
Aug 20th, 2000, 01:37 PM
#4
transcendental analytic
You would have to close them manually
If you have several objects declared in different modules, i think you could make all modules containg two methods, one that inits all objects and one that unloads them..
For instance:
Code:
Module1.InitObjs
Module2.InitObjs
'Do stuff
Module1.TerminateObjs
Module2.TerminateObjs
Then you have in the modules
Code:
Public object1 as class1,object2 as class1
sub InitObjs
Set object1=new class1
set object2=new class2
end sub
sub TerminateObjs
Set object1=nothing
set object2=nothing
end sub
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 20th, 2000, 01:55 PM
#5
Thread Starter
New Member
That's exactly what I wanted to avoid
-
Aug 20th, 2000, 02:41 PM
#6
transcendental analytic
Well, you can't, but there's another way
you can load all objects under one main object, and then you unload the main object, which will terminate all subobjects
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|