StaRKeY
starkey at wanadoo.nl
Wed Oct 5 14:39:15 CDT 2005
Hi Jim, AFAIK only created objects have to be set to nothing (sounds logical, it is NOT set to anything so why set it to nothing) eg. Being dimmed with the 'new' or set as 'CreateObject'. Also the variable 'dies' once the program is no longer using the procedure it is dimensioned in unless it's public/static or private to a module ofcourse. So in your case having multiple recordsets and using 5, the sources used by the system/application will not be reduced by a 'set to nothing' but you'd better dimension less recordsets. Microsoft has a document on things to kepe in mind when programming in Access, some kind of whitepaper where you can find all about these kind of things, very interesting if you're looking for ways to improve performance and memory usage. For example; always use a var as .... If you leave out a type a variant will be used causing more memory in use. Also it seems to be better to create larger procedures in a module instead of creating several procedures over several modules though this is more readable code usually it does slow things down according to Bill:-) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000/htm l/actrbOptimizingPerformanceS.asp HOWEVER, personally I always set all objects to nothing since I'd rather be safe than sorry;) Regards, Eric Starkenburg -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hale, Jim Sent: Wednesday, October 05, 2005 9:09 PM To: 'Accessd (E-mail) Subject: [AccessD] Setting objects to nothing if an object is dimmed but not used (ie set) must it still be set to nothing when cleaning up? Ex dim rs(1 to 14) as recordset where only 5 recorsets are used in a given run. Jim Hale *********************************************************************** The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender and delete the material from any computer. As a recipient of this email, you are responsible for screening its contents and the contents of any attachments for the presence of viruses. No liability is accepted for any damages caused by any virus transmitted by this email. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- avast! Antivirus: Uitgaande bericht is niet besmet. Virus Gegevensbestand (VPS): 0540-2, 05-10-2005 Getest op: 5-10-2005 21:39:16 avast! auteursrecht (c) 1988-2005 ALWIL Software. http://www.avast.com