+ Reply to Thread
Results 1 to 2 of 2

Tearing down circular references

  1. #1
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Tearing down circular references

    It's been a while since I actually made anything nifty in VBA and a recent poster was (for homework I think) trying to make a blackout/lights out game on an Excel Userform here http://www.excelforum.com/excel-gene...ual-basic.html

    So I decided to have a crack at it, I haven't posted it in that thread since 1, think it was homework and 2, It raised an issue I haven't had to deal with in a while - circular references. So my question is; in the attached workbook, have I torn down the relationships between the classes sufficiently enough for the memory to be released? Or should I be using pointers to create weak references?

    Here's the code if anyone doesn't want to download:

    UserForm (with a button on called btnReset)
    Please Login or Register  to view this content.
    Class CLightButton:
    Please Login or Register  to view this content.
    Class ILightsOut
    Please Login or Register  to view this content.
    I've posted a simplified version of this here: http://stackoverflow.com/questions/1...lar-references

    Now CrossPosted here: http://www.mrexcel.com/forum/excel-q...eferences.html

    and http://www.eileenslounge.com/viewtopic.php?f=27&t=11577
    Attached Files Attached Files
    Last edited by Kyle123; 11-16-2012 at 05:26 AM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Tearing down circular references

    Tentative bump, I'm no closer to a definitive answer over at SO either.

    I should add, that the terminate routine runs in both the parent form and the child classes

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1