The Artima Developer Community
Sponsored Link

.NET Buzz Forum
An interesting Memory Leak problem.

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Roy Osherove

Posts: 1807
Nickname: royo
Registered: Sep, 2003

Roy Osherove is a .Net consultant based in Israel
An interesting Memory Leak problem. Posted: Jul 11, 2004 12:05 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Roy Osherove.
Original Post: An interesting Memory Leak problem.
Feed Title: ISerializable
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/rosherove/Rss.aspx
Feed Description: Roy Osherove's persistent thoughts
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Roy Osherove
Latest Posts From ISerializable

Advertisement
Udi is having a hard time figuring out a nasty weird memory leak problem. I have no idea what the answer is, but I'm sure one of you smart people out there could chime in. I'd love to see what the answer to this problem is.
so - here's an exerpt that explains when the memory leak occurs and the explanation that is currenly suggested:
 
After asking around a bit, nobody could give me an explanation. Eventually, one of my programmers gave somebody a call, and he had an explanation. Now, this person could speak only Russian, so what I'm saying here comes via a second hand translation by my programmer (I don't speak any Russian). The reason he gave for this happening was that DLL's have a heap which is separate from that of the EXE, and that although structs are value types, they still have heap representation - they are objects that behave like primitives. Now, in cases when the thread is created within code from the DLL, automatic cleanup of memory allocated on the heap doesn't occur when using structs. When the thread is created within code from the EXE, the memory is automatically cleaned up.

I had a hard time believing this, to say the least, but I couldn't find any other explanation. After checking it up a bit, and talking to some more people, I was still left high and dry. Everywhere I looked (and heard), there was no justification to his claim. However, by that exact same information, my problem shouldn't have been occurring.

So, like I said before, the solution is to have the code that creates the threads on the EXE. If anyone can tell me why, I'd truly appreciate it - especially if you can find documentation supporting it :)

Read: An interesting Memory Leak problem.

Topic: My feed reader of choice - RSS bandit Previous Topic   Next Topic Topic: MCMS Connector for SharePoint Technologies Review

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use