[AccessD] Setting objects to Nothing

Max Wanadoo max.wanadoo at gmail.com
Tue Feb 16 11:15:06 CST 2010


Well, afaik declaring an object in a  function/sub means that it will go out
of scope when that function/sub is closed and declaring it at module level
means it will go out of scope once the  last function/sub in that module is
accessed/used.

IOW, it destroys itself - theoretically.  Good  programming is about not
relying on theory but  on making sure!

Remember the spaceship that crashed because of a missing comma (in ADA I
believe). No, me neither, but sounds good,  eh?

Regardless, however,  Gustav sorts me out tout suite!

Max

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: 16 February 2010 16:46
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Setting objects to Nothing

Well, that's the thing... is it really sloppy? Now, we know that Recordsets 
and other objects can cause cleanup problems. But a reference object? It's 
so obscure and rarely used -- I've never heard of it being a problem. That 
doesn't mean it can't be, just not sure it is either. However, setting it to

Nothing cost nothing. :) But I can easily see some "genius" complaining that

I obviously don't know what I'm talking about because it's not necessary to 
cleanup after a Reference object because...

Susan H.


> Or better still, tell them they are writing sloppy code and refer them to
> Gustav...
>
> Max

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list