Solved

VBA Memory Allocation on removed collection items

Posted on 2011-09-06
1
347 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 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

19 Experts available now in Live!

Get 1:1 Help Now