Do you know what happens when you write C+++ Qt code with web dev experience? Your mental model for memory management (which is non-existent because JS has GC), leads to memory leaks.

It’s so bad I had to:

  1. rewrite most of the init code for member variables in almost all widgets so the expectation of “WidgetA” from “child C” of MainWindow is available when “WidgetB” emits a signal.

  2. currently debugging memory leak when MainWindow is closed - huh? Yup, I have a WindowActivate event that triggers a “status” update and ALL important widgets listen to the signal emitted by THIS fn to update the state.

  3. A connect() is causing seg fault right now when I update the widget’s state multiple times in a row. (still haven’t checked this out yet)

  4. clang-tidy is labelling cosmetic things like “Class obj = new Class();” into “auto obj = new Class();” and my OCD is annoyed.

#diary #cppdev #gitraven #opensource