|
-
Dec 21st, 2015, 04:46 AM
#10
Re: Dispose of a class from within the class.
I'd suggest perhaps not making it entirely self-contained. If you have many instances of the class then they will all have their own timer. It would be better to have a single object containing a timer, and have it notify all the "flying box" instances when they need to update. Similarly, a single instance of a class that manages all your box instances would prevent your form from needing to know about all of the boxes, but also give you a single place to coordinate the creation/removal of the boxes.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|