Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / January 2005

Tip: Looking for answers? Try searching our database.

Debugging question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daryn Kiely - 21 Jan 2005 01:23 GMT
Hi,

I have an unmanaged DLL that I have written a managed wrapper around,
however I am getting intermitent crashes where it seems like the heap has
been corrupted.  My theory is that a garbage collection has moved something
that I didn't expect to be moved.  I have scoured the code and have not seen
any obvious pinnings I have missed.  Is there any way to tell what the
garbage collector is moving??

Thanks in advance
Daryn
Patrick Steele [MVP] - 23 Jan 2005 03:00 GMT
> Hi,
>
[quoted text clipped - 4 lines]
> any obvious pinnings I have missed.  Is there any way to tell what the
> garbage collector is moving??

You could try creating a WeakReference for the object you suspect is
getting garbage collected.  At the time you need to access it, check the
WeakReference.IsAlive property to see if it's been GC'd.

Signature

Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.