LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Garbage collection in VBA

I had read that its good practice to set instances of class to Nothing
to free up the memory.

Is there garbage collection in VBA?

Also is there any benefit to setting Application Object Model class
variables to Nothing upon exiting a procedure or function? For example

Dim myRange as Range

Set myRange = Something

Do some code

Set myRange = Nothing

Exit Function

Or is the memory allocated in the function returned to the heap when the
function goes out of scope?



*** Sent via Developersdex http://www.developersdex.com ***
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I delete an infinite number of garbage cells to the right terry Excel Discussion (Misc queries) 2 April 4th 23 11:21 AM
Excel opening w/ garbage WLMPilot Excel Discussion (Misc queries) 2 December 13th 05 02:43 AM
MSCOMM returning garbage as input Marty[_5_] Excel Programming 0 August 29th 05 03:49 PM
Deleting garbage Sandra[_6_] Excel Programming 13 May 5th 05 05:47 PM
delete garbage from worksheet mkk Excel Programming 2 February 18th 04 07:31 PM


All times are GMT +1. The time now is 02:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"