tonywilliams
Member
- Joined
- Feb 12, 2007
- Messages
- 9
- Programming Experience
- 3-5
Hi
I am having a nightmare with a memory leak, I think I know where it occurs, but not to sure how to prevent it.
I have a "diary" system, which shows a day at a time on a "page". Each day/page has up to 12 "panels" containining the information for each appointment. Each of these panels has a right click menu and tooltips as well. It works well, when the user clicks on a date in the calender or the "next day" & "previous day" buttons, it shows the next day with the appointments / panels for that day.
When the user clicks onto the new day the program runs a subroutine which loads the new panels onto the diary page. However at each diary click the memory usage is increased until eventually the program slows down and eventually closes.
Each of the 12 "panels" is a panel that sits in a flowlayout box, the panel has a variety of labels and also the rightclick menu and tooltips. I am certain that this is where the problem lies, as with each click, the new panels are created but the old ones and all attached controls are not disposed properly, as I am not sure where, or how to do this.
Any help would be appreciated.
Regards
Tony
I am having a nightmare with a memory leak, I think I know where it occurs, but not to sure how to prevent it.
I have a "diary" system, which shows a day at a time on a "page". Each day/page has up to 12 "panels" containining the information for each appointment. Each of these panels has a right click menu and tooltips as well. It works well, when the user clicks on a date in the calender or the "next day" & "previous day" buttons, it shows the next day with the appointments / panels for that day.
When the user clicks onto the new day the program runs a subroutine which loads the new panels onto the diary page. However at each diary click the memory usage is increased until eventually the program slows down and eventually closes.
Each of the 12 "panels" is a panel that sits in a flowlayout box, the panel has a variety of labels and also the rightclick menu and tooltips. I am certain that this is where the problem lies, as with each click, the new panels are created but the old ones and all attached controls are not disposed properly, as I am not sure where, or how to do this.
Any help would be appreciated.
Regards
Tony