File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,22 @@ class FlxGraphic implements IFlxDestroyable
421421 if (newBitmap != null )
422422 bitmap = newBitmap ;
423423 }
424-
424+
425+ /**
426+ * Frees the software image buffer for this graphic's `BitmapData`.
427+ * This can significantly reduce RAM usage at the cost of not being able to draw on the graphic.
428+ *
429+ * Note that this operation might not complete immediately;
430+ * it might take a bit for the garbage collector to collect the bitmap.
431+ *
432+ * @see `openfl.display.BitmapData.disposeImage()`
433+ */
434+ public function dump (): Void
435+ {
436+ if (bitmap != null )
437+ bitmap .disposeImage ();
438+ }
439+
425440 @:deprecated (" `undump` is deprecated, use `refresh`" )
426441 public function undump (): Void
427442 {
You can’t perform that action at this time.
0 commit comments