|
-
Oct 29th, 2000, 09:07 PM
#1
Just got an email from our local experts circle and they claim that....a cls file once activated in a vb project remains in memory for the duration of that project.....
May be this could be the answer to a number of posts regarding memory usage? Don't know, our memory problems are generally to do with the number of dlls attached to a project.
Am so confused on this issue
-
Oct 29th, 2000, 09:20 PM
#2
transcendental analytic
Hehe, dunno, how could i know about something that really never ocurred to me.
Sounds reasonable anyway, why would the app unload the class in the middle if there could be a chance it has to use it again I'm not sure either about this but i think all classes are loaded at execution, if in the same project, and i think in that case doesn't count Dll's
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.
-
Oct 30th, 2000, 08:06 PM
#3
Damn that could explain some things
Vaguely remember that you were one of the people who asked about "out of memory" errors. Thought this may be an answer. We currently have a guy expiermenting with this issue to see if what is claimed is true.
Bad design by MS if it is the case, if a class file is only used on one form or by one bas through a project, why load it at execution, the form/bas may not be called during the current session.
Hopefully a worst case is that it gets left in memory after accessing, and can be set to nothing after use. Knowing MS as we do this is quite likely not to be the case. Could be yet another arguement for switching to Delphi.
-
Oct 30th, 2000, 08:36 PM
#4
transcendental analytic
Hmm, i don't even remember this myself, maybe there's out of memory in my brain hehe. But actually i think that's what the problem is, why would all the classes be accessible in designtime anyway? If they weren't loaded then why can you use any of them whenever you want by using immediate window for instance.
I think i mixed up one thing in my last post if anyone didn't notice, i meant that the standard Dll's don't get loaded at startup while ActiveX's should probably be there loaded all the time until the app terminates.
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.
-
Oct 30th, 2000, 09:44 PM
#5
Addicted Member
Fro what ist worth
Hi,
I don't know if it of any use but, once I used Microsoft forms 2.0 object library in my project and for a listbox whict accepts mor than 32767 items.
It worked fine at the runtime but when it was compiled I kept getting out of memory error even, when I put nothing in the listbox. When I removed the said library my program worked fine.
-
Oct 31st, 2000, 04:32 AM
#6
New Member
Surely the app only needs one instance of the class in memory so that it knows data structures etc.
When you create an instance of that class..it reserves memory
When you set the class variable to nothing it frees up??
-
Oct 31st, 2000, 04:04 PM
#7
This is a truely weird feature
Latest reports from the trenches is that when the project fires up no classes are put in memory....apparently we are still trying to verify this.....but when you access a form with classes on it, they are immediatly put into memory, and stay active during the life of the exe. Apparently setting them to nothing issues an error, Phantomd is going to test this out today as LA may have coded it wrong.
Gee another great feature from Microsoft, up there with Mass's library issue.
-
Oct 31st, 2000, 04:27 PM
#8
transcendental analytic
That sounds really weird! Jethro i'm not sure what you mean, by "Apparently setting them to nothing issues an error"
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.
-
Oct 31st, 2000, 08:58 PM
#9
Haven't been in the office in a couple of weeks but
Code:
Set clsCustomer = Nothing.
Is setting off an error, may have mistyped that, anyway Phantomd is going to swing by and check it out. For all we know LA Dave forgot to add the friggin class in the first place.
-
Oct 31st, 2000, 10:09 PM
#10
transcendental analytic
Hey Jethro, that's the way you remove Objects from memory, not classes
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.
-
Nov 1st, 2000, 01:37 AM
#11
Ahhhhh.....how do you clear a cls file then
Sorry have been away getting my mind around "frocking up for the melbourne cup" and getting a delivery docket to work on a pos printer....the joys of professional programming.
-
Nov 1st, 2000, 02:14 AM
#12
transcendental analytic
Can't think of anything, i'm almost sure it's impossible
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.
-
Nov 1st, 2000, 02:53 AM
#13
In design time,the classes are not loaded. The intellisense stuff works by looking at the code physically, or though a typelib interface it avaialble.
At runtime, certain types of referecned classes are loaded immediately (publicnotcreatable for instance), and other classes are loaded when required. Only one copy of the classis is ever in memery at once (or so the theory goes). Many instances just have a bit of memory reserved for them to store their particular variables values.
Code:
Set mobjMyClass = Nothing
should work all the time. You have got a dot at the end, but that's probably a typo.
- gaffa
-
Nov 1st, 2000, 04:07 PM
#14
Ok the expiermenting continues
Kedaman your right setting to nothing causes an execution error everytime. Classes are being loaded as they are accessed, but are never unloaded during the projects lifetime. BAS files seem to be the answer to these, but then they aren't really class files as such.
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
|