Solved

VBA Memory Allocation on removed collection items

Posted on 2011-09-06
1
358 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

688 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