TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
padma
NA
11
11.7k
High Unmanged memory of c# winform application
Sep 5 2014 9:09 AM
I user to track the memory of my winform application with the help of tools(.dot memory).
It is observed that managed memory is getting released at some point of time but unmanaged memory is not.
While application launching itself unmanaged memory is showing a high value(75MB ,Total memory=80MB).
In my application i am using win32 APIs(Namely SetWinEventHook(),GetWindowText(),GetForegroundWindow(),GetWindowThreadProcessId(),SendMessage(),FindWindowEx(),PostMessage(),RegisterWindowMessage()...)
and Com Component(Microsoft.Office.Interop.Excel).
I am just calling the win32API methods and not taking care of releasing them .
In This Win32 Methods, shall i need to take any special precaution in calling methods and releasing the variables memory (espectially like INTPTR).
Anyhow,the COM component which is used gets released by using Marshal.ReleaseComObject() method.
Is the unmanged memory is high due to use of so many win32 API in the application.
Can some please share your ideas about this.
i have used performance monitor tool to identify any memory leakage in the application.
i kept for two days but i didnt find any plotted graph.It is always linear.
Can some tell please how many days it will take to get a plotted graph.
Can some one please also explain for how many hours after we need to take dumps of memory from debug diagnostic tool to analysis the top 2 function which is taking more memory.
i have created a winform with no code written & no controls placed inside it.i tracked memory through tool.
i got unamaged memory for this as 25MB(Total Memory=28MB).
I didnt understood ,eventhough i am not using any unmanged code for it its till showing 25MB.Is this the default Unmanaged Memory.
Please help me.
Reply
Answers (
1
)
Attempted to read or write protected memory.
which namespaces do i need to learn for desktop and server