protected virtual void Dispose(bool isDisposing) { MainBuffer.Dispose(); for (int i = 0; i < effectBuffers.Length; i++) { effectBuffers[i].Dispose(); } }
private void InitMainBuffer(int w, int h) { if (MainBuffer != null) { MainBuffer.Dispose(); } if (MainBufferBack != null) { MainBufferBack.Dispose(); } if (MainDoubleBuffer != null) { MainDoubleBuffer.Dispose(); } MainBuffer = new Bitmap(w, h); MainBufferBack = new Bitmap(w, h); MainDoubleBuffer = new Bitmap(w, h); }