Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible memory leak? #35

Open
todar opened this issue Jul 19, 2019 · 0 comments
Open

Possible memory leak? #35

todar opened this issue Jul 19, 2019 · 0 comments

Comments

@todar
Copy link

todar commented Jul 19, 2019

Not sure if I am missing something here or if I uncovered a memory leak. I was adding a Terminate event to TestSuite and noticed it doesn't fire.

Private Sub Class_Terminate()
    Debug.Print "This should fire from TestSuite..."
    Stop
End Sub

I was trying to find out why this was being skipped over and I came across this rubberduck blog lazy-object-weak-reference.

By storing the TestCase objects in the Tests collection it seems like it stays in memory (possibly even all the TestCase objects as well then?). I don't know how to check if this actually is the case or if something else is going on preventing the event to fire.


I ran a test in which I set the collection to nothing and sure enough the Terminate event fires. Perhaps TestSuite should have it's own state of the various statuses of the tests vs holding references to all the TestCase classes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant