Closed dagewa closed 3 years ago
It worth commenting that some data should remain in memory to make it fast and responsive, I am not sure about what part of the code it worth to make it more functional and less class-type. If it is part of the C++ code that generate bitmaps, I should warn that there is a class that keeps in memory an array with a palette transformation that should be generated only once, instead of every time a new bitmap is needed
It seems to me that
img_w_cpp
andbuild_qimg
are essentially pseudoclasses. Graphical errors and occasional segfaults were occurring, probably when the data bufferarr_i.data
went out of scope and was garbage-collected.It might be possible to remove these classes and adopt a more functional approach that could tidy this up. But for now, simply keeping the data array around seems to fix the issue.