"Granny Spitz via AccessMonster.com" <u26473@uwewrote in
news:67a28a69794af@uwe:
MLH wrote:
>Do programmers have to
worry about memory leaks that may/might/dunno occur?
Yes, but there's only so much you can do about it in VBA. You know to
close objects you open and then set them to Nothing, and now you know
you should erase dynamic arrays, too. That's about it.
Yeah, I spend hours evry day worrying about West Nile Virus, Bird 'Flu,
Adolph Harper and Aids, oh, and not closing database objects and
releasing pointers to them.
So far none of these has ever done me the slightest bit of harm. But I
guess it's fashionable to be safe: oh look Mommie, see where it says,
"Rcs.Close, Set Rcs = Nothing." Aren't I a good boy, Mommie? Aren't I?
Have you ever thought about the statement
Set Rcs = Nothing? What is Nothing? And how could anything be equal to
nothing? Huh? Well, upon further review we find this statement simply
sets the value of the object pointer to zero. So what's "Set Rcs =
Nothing" got to do with that?
I prefer this:
1. don't explicitly open dao recordsets ever;
2. don't open ado recordsets very often; limit this to twice a year;
3. don't close anything;
4. don't release anything;
5. when something doesn't work; repair it;
6. don't write 50000 lines of unnecessary code; this will make #5 way
easier.
I know the MVPs and David won't agree with me (those who haven't
demonstrated their tolerance for disagreement by plonking me that is).
So, what more evidence do you want?
--
Lyle Fairfield