Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > WinFX General

Garbage collection and disposing resources

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 04-17-2007   #1 (permalink)
JN1974
Guest


 

Garbage collection and disposing resources

Hi,

Is GC and disposing supposed to be handled the same way with WPF objects as
with normal .NET objects?

I'm having with Image not freeing up the source file, but keeping it locked,
even after setting Image.Source to null and deleting the frame where it
resided and forcing the GC to collect. Is there a some other way we're
supposed to do that now?

My System SpecsSystem Spec
Old 04-17-2007   #2 (permalink)
JN1974
Guest


 

RE: Garbage collection and disposing resources

Found out myself, that the BitmapImage which is the source needs to be
created with CacheOptions set to OnLoad.

Still very strange, that closing the object and forcing GC to collect didn't
help.

"JN1974" wrote:

> Hi,
>
> Is GC and disposing supposed to be handled the same way with WPF objects as
> with normal .NET objects?
>
> I'm having with Image not freeing up the source file, but keeping it locked,
> even after setting Image.Source to null and deleting the frame where it
> resided and forcing the GC to collect. Is there a some other way we're
> supposed to do that now?

My System SpecsSystem Spec
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
garbage bin ccc38941 Vista General 2 07-25-2008 11:25 PM
DEP Garbage Richard Vista security 3 11-17-2007 02:08 AM
should out-null offer the option of disposing incoming objects? Oisin Grehan PowerShell 1 04-02-2007 11:52 AM
Garbage Collection and PowerShell SQL Guru PowerShell 4 03-30-2007 11:26 PM
LOST MY GARBAGE ICON!!! lol MeTRulez Vista General 2 02-04-2007 11:35 PM


Update your Vista Drivers Update Your Drivers Now!!

Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008