Skip to content

Stack-allocate Kaidan object again

Jonah Brüchert requested to merge jbbgameich/kaidan:stack-kaidan-object into master
  • Was only changed to heap because I thought the QQmlEngine needed to delete it
  • Now I know about CppOwnership.

The Kaidan class should be small enough to be stack allocated, it's mostly a collection of pointers, four QStrings and some numbers (enums, bool, int). Also it doesn't have a parent, which means the Qt memory management won't interfere and no more special handling is required. Just deleting it when the main function ran through is enough. And of course I should mention that the stack is faster :)

Edited by Jonah Brüchert

Merge request reports

Loading