Re: Memory leaks and how to solve them



On 16 aug, 16:44, "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:
There's no CF 2.0 tool that will directly pinpoint where the allocation was
made but not released (though RPM 3.5 also has a profiler tool that will
show this, so installing Studio 2008 beta for this tool might be useful).
It sounds like you are creating a new task list form every time but still
holding some reference to the old one (like in an event handler) so they're
stacking up (no pun intended) in the Heap.

--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded Worldwww.OpenNETCF.com

"Daan" <daanst...@xxxxxxxxx> wrote in message

news:1187260777.952090.105790@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



Users of the application I have developed report an occasional
OutOfMemoryException. This prompted me to do some research on memory
management and related issues and I have learned to use the NetCFRPM
tool in combination with perfmon.

In my application, there is a task list. When the user clicks on a
task, the details of this task are shown. Tapping 'back' takes them
back to the task list. I can see with the tools that every time the
user views details and goes back, the Managed Bytes Allocated counter
increases. Also, the count of a number of items only increases in the
'compare heap' overview in the NetCFRPM tool, in particular the
Microsoft.AGL.Forms.WnProc and the System.EventHandler and a number of
GUI components.

Now my problem is, I know these issues exist, I just can't trace them
to any particular point in my source code. Is there a better solution
then just 'code inspection' or will I have to hunt through all the
lines of code until I find the source of the problem?

Thanks for any suggestions!
Daan- Tekst uit oorspronkelijk bericht niet weergeven -

- Tekst uit oorspronkelijk bericht weergeven -

Every time the 'details' view is displayed, 25 new custom controls are
created to display the details of the task. When the 'list' view is
displayed, the panel and any list that contains the 25 custom controls
are cleared. I have tried adding code that removes the event handler
from the items on the panel before clearing the panel.Controls, but
this does not solve the problem. Is there any other way (other then
event handlers) that a reference can still exist to the objects, even
though they are cleared from the panel?

.



Relevant Pages

  • Re: Gemini pictures on TV
    ... "The Gemini-ATV Status Panel (ASP), was mounted on the forward end of the Target Docking Adapter of the Agena Target Vehicle where it was visible to the astronauts in the Gemini spacecraft during and after the docking maneuver. ... The ASP system consisted of a display panel with nine display lights and three analog dials and the necessary circuitry which was distributed throughout the Gemini-ATV. ...
    (sci.space.history)
  • Re: Resources
    ... It displays a panel and a Project Guide toolbar. ... Wizard-like interface) project and task set up. ... Resources display lets you do the same thing for resources. ...
    (microsoft.public.project)
  • Re: Dell Latitude video presentation is larger than the display!
    ... > but issues with the display. ... > the panel. ... > replaced LCD panel and the system? ... the switch positions required for those panels. ...
    (comp.sys.laptops)
  • Re: Can you refresh a form displayed via showmodaldialog method
    ... page1 I launch another window using the showmodaldialog method. ... page2 there is a button and a panel the panel starts off visible = false. ... >>> showdialog method opens up a record to be edited. ... >>> inline confirmation message does not display because the dialog form ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Glass Panel Longevity
    ... command packet format... ... I would like to see a system where you could put the actual measuring ... that display the information... ... on the panel... ...
    (rec.aviation.piloting)

Loading