Solved

VBA Memory Allocation on removed collection items

Posted on 2011-09-06
1
343 Views
Last Modified: 2012-08-13
I have a nested collection of objects, where each meter object(parent) has a collection of interval objects(children). If I remove a meter from the the parent collection that has 30000 interval objects in it's interval collection, do I need to iterate through each interval to remove it from the child collection? Or can I just remove the meter object?  Will Excel perform garbage collection on all child objects, or will this result in a memory leak?
0
Comment
Question by:AndyH79
1 Comment
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 250 total points
ID: 36493810
Excel should perform garbage collection (though who knows when). However I would suggest that you use the terminate event of the parent to explicitly destroy the children (so to speak).
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now