Skip to content

Commit 8733c1f

Browse files
committed
(FIX] : memory leak fix with singleton declaration i used before. thanks to @yoshimi12318 in the commit https://github.com/yoshimi12318/SimpleEngine/commit/46da381bc5b217385fb7faf1acce029b04f5dbe7
1 parent c7b1596 commit 8733c1f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ImGuiFileDialog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ namespace IGFD
659659
public:
660660
static FileDialog* Instance() // Singleton for easier accces form anywhere but only one dialog at a time
661661
{
662-
static auto* _instance = new FileDialog();
663-
return _instance;
662+
static FileDialog _instance;
663+
return &_instance;
664664
}
665665

666666
public:

0 commit comments

Comments
 (0)