Unexpected “Cannot access a disposed object” in clean up method
问题 I am facing a puzzling disposed object issue when I shut down my WPF application. If you spot any mistakes in my logic please point them out. I have a ColorManager class with update() method, as shown below. public void Update(ColorImageFrame frame) { byte[] pixelData = new byte[frame.PixelDataLength]; frame.CopyPixelDataTo(pixelData); if (Bitmap == null) { Bitmap = new WriteableBitmap(frame.Width, frame.Height, 96, 96, PixelFormats.Bgr32, null); } // draw bitmap RaisePropertyChanged(() =>