From d16267be986c0994f05fc6a3889b83ba53a230b0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 13 Apr 2025 21:09:37 +0200 Subject: Don't bind a shared_ptr to ImageChanged (#3013). Otherwise if the GUI is busy when the emissions build up, each one holds a reference to a potentially large image. This caused enormous memory use when playing a DCP and verifying it at the same time. --- src/wx/video_waveform_plot.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/wx/video_waveform_plot.h') diff --git a/src/wx/video_waveform_plot.h b/src/wx/video_waveform_plot.h index f482da8f8..e6e7a6f3d 100644 --- a/src/wx/video_waveform_plot.h +++ b/src/wx/video_waveform_plot.h @@ -56,7 +56,7 @@ private: void paint (); void sized (wxSizeEvent &); void create_waveform (); - void set_image (std::shared_ptr); + void set_image(); void mouse_moved (wxMouseEvent &); std::weak_ptr _film; @@ -67,6 +67,8 @@ private: int _component = 0; int _contrast = 0; + FilmViewer& _viewer; + static int const _vertical_margin; static int const _pixel_values; static int const _x_axis_width; -- cgit v1.2.3