Skip to content

Potential memory leak when repeatedly calling ui::Button::setTitleText #3090

@NgVThangBz

Description

@NgVThangBz
  • axmol version: v3
  • devices test on: MacOS (not test in other)
  • developing environments
    • NDK version: r23c
    • Xcode version: 14.2+
    • Visual Studio:
      • VS version: 2022 (17.9+)
      • MSVC version: 19.39+
      • Windows SDK version: 10.0.22621.0+
    • cmake version:

When calling ui::Button::setTitleText() repeatedly, memory usage continuously increases and is not released.
Steps to Reproduce:
in update(float dt):

    static int cout = 1;
    std::string title = fmt::format("{}", cout);
    _button->setTitleText(title);
    cout++;
    if(cout>1000){
        cout = 1;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions