.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

WPF Memory leaks in a Huge Images list

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :WPF

I create a simple WPF application to display images in a child window from a folder.

this folder contains a huge number of images

After closing the child window that contains a virtualization tile panel and a data virtualization collection taken from this article the memory will not return as it was before opening the window.

I followed some steps mentioned in this article. but i still see some memory leaks! so could you please help me to find it.

- All of resources are frozen like this:


<Window ...



View Complete Post

More Related Resource Links

How to detect and avoid memory and resources leaks in .NET application

Despite what a lot of people believe, it's easy to introduce memory and resources leaks in .NET applications. The Garbage Collector, or GC for close friends, is not a magician who would completely relieve you from taking care of your memory and resources consumption.

I'll explain in this article why memory leaks exist in .NET and how to avoid them. Don't worry, I won't focus here on the inner workings of the garbage collector and other advanced characteristics of memory and resources management in .NET.

Debug Leaky Apps: Identify And Prevent Memory Leaks In Managed Code


When is the .NET Garbage Collector unable to reclaim memory? The answer might surprise you. Stay tuned.

James Kovacs

MSDN Magazine January 2007

WmiPrvSE.exe causes a huge memory leak in SQL server 2008 R2, why?

My OS is windows server 2008 r2 data center 64 bit and my SQL server is server 2008 R2. The problem is when I open sql server, the WmiPrvSE.exe process consumes 20 - 60kbs every second. Several hours later, it eats up at least 200mbs memorry and this process seems like it will never stop. Can any experts give me some ideas to fit this mess? PS: My mainboard is Asus striker II formular, cpu is intel quad-core. Also, all my software are updated to latest version.

memory leaks

Hi, I am trying to detect memory leaks...memory(RAM) keep goes up this is the code I am using, where dbManager is the DLL that holds all of the DAL Code (LINQ TO SQL) foreach (string lnk in splited_links) { unique_key = Helpers.FilterBadWords(lnk, new string[] { "http://www.", "-lcs.html" }); article = dbManager.GetArticleByUniqueKey(unique_key); if (article == null) { Match matchLyrics2 = reLyricsPage.Match(lnk); if (matchLyrics2.Success) { //do something } } } //IN THE DLL FILE public Tbh_Articles GetArticleByUniqueKey(string uniqueKey) { using (KaruselaDataContext ctx = new KaruselaDataContext(connection)) { //KaruselaDataContext ctx = new KaruselaDataContext(connecti

Form background images and memory usage

Hello everyone, please forgive me if this is the wrong forum for this post. I have written a Windows App in C#. It's a real small application (something like a widget) that stays on your desktop and shows pictures of a folder in a random sequence. Before showing another picture i use : this.BackgroundImage.Dispose(); so that i keep memory usage low. If i won't do that i can see memory rising (depends on the image size). Now the code i use to change the picture is : this.BackgroundImage = Image.FromFile(path, true); So my question is about this last line of code. Is this a good approach of changing the picture after a while? (this code runs in a loop) Should i care about memory usage? The form is a small one for this kind of app, so loading big and large pictures can have some issues i guess. I have been monitoring my app for some time , memory and cpu usage were really low but i would like to know another and better approach on this one if somoeone knows.  de_Stan

Display Images from a Custom List's Attachment Field

i need to show each item on the list with image that was uploaded to its attachments field. the idea is that this list is a news list and will be show as a grid with the news and their corresponding attached image. i tried to add a custom column of type Picture, but it only allows to have a hyperlink added. i need the ability to upload the image on a new item creation form.   if there is a way to display it that would be great, if not please recommend a way to accomblish what i have explained.     thanks  

open faster huge list of combobox

Hi All. In detail form I have combobox with some thousand rows. I preloaded collection view of this list in parent form and make equal collection view of parent form to collection view detail form for combobox. But still need wait approximately 5 second when list will open. How to do that list of combobox will open faster. Thanks.

AJAX UpdatePanel Memory Leaks in IE.


After researching why a page I have using an UpdatePanel to perform a refresh every 15 seconds was using up piles and piles of memory over time, I discovered that this is a "well-known" issue with the UpdatePanel not cleaning up properly in IE (some issue with reference counting in COM interop or some such).  UpdatePanel does not seem to have this issue in Firefox (haven't confirmed the issue in other browsers).

If this is a "well-known" issue, two questions:

Is there a "well-known" workaround to this?  I know that a full-page refresh will cause the memory to be cleaned up, but some pages may be up for a long time and I don't want to interrupt any user interaction with the page that may be going on.  I will if it is required, but it is a sloppy, sloppy UI kluge... you know, one of those "as a self-respecting coder I hang my head in shame at what I have wrought" kind of kluges.

Is there any effort being made to fix this?  I've looked about, however, most articles on this do not make mention of even MS acknowledging bug status for this while I've seen many telling me why this is an issue, and how it's a "design" thing.  I hear IE9 is supposed to take care of this... I guess what you'd call a non-issue, but it will only be available to

Server out of memory error in a LIST (anonymous site) that has eventhandlers


Scenario: We have a sharepoint site on wss 3.0 set to anonymous access. It has couple of lists and the pages render fine to any user. The moment I associated eventhandler to a list, started getting 'server out of memory'. Removing eventhandlers works fine but without eventhandlers I can't write business logic.

Searched so far and found that people have suggested to use guest account or some other account. Still looking into this so far.

Does anyone has better resolutions? Has Microsoft released any solution / hofix so far? 


Workflow History list - Huge number of entries.


Hi there,

Does anyone know if there is an issue with having a large number of entries in the workflow history list. I've got 2 sites that have only been in existence for 9months and the workflow history lists are already at 14000 entries?

Is this list size an issue?

Would growing at this rate cause an issue in the future?

Is there anything we could do about it? settings, delete routines..

Any ideas/suggestions gratefully received!



running SharePoint 2010 and on the server w3wp.exe is consuming huge amounts of CPU and Memory bring


I'm running Server 2008 (64bit) with 8Gig of RAM and 4 processors.  We haven't had more than four people in Sharepoint at the same time and performance has been extremely poor (had moments where things run ok but it usually doesn't last for more than a few minutes).  We're not even doing anything advanced.  Just a very small document repository with basic searching.

When I log into the server I can see several w3wp.exe processes running and will spike up to 100% of the CPU.  Memory will be around 100-800 Mb for each process.

Any ideas on how to speed up SharePoint 2010 performance?  Our SharePoint 2003 box runs MUCH faster and has 100+ users and over 3000 documents???



copying huge list of 12 gb

I want to copy huge list of 12 gb with workflow attachments, from one site collection to another programmatically. I also tried to create a template and move but the list is too huge to save as template. Can any one help me please?

WCF and iisreset with huge memory



I have a WCF service running in IIS 6 which caches huge amount of data(inside my service) which does not change often...

Whenever the data changes I want refresh the cache. I use iisreset , this goes fine, but my cache is not refreshed with new data(I don't mind a downtime so i am fine with iisreset).... It somehow uses the old cache...

I even used Adsutil.vbs and restarted the app-pool, but even this did not help.

But on changing the web.config the cache is refreshed with the contents.

So does iisreset recycle the app-pool. I assume that iisreset would actually kill all the reflected process and free the memory held(garbage collected ) and there should be no way it should refer to old cache memory.

Any solution or suggestion to this will be welcome....



Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend