ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
57.74k stars 9.9k forks source link

Are there ImGui APIs that can throw? #7711

Open alien-brother opened 2 weeks ago

alien-brother commented 2 weeks ago

Version/Branch of Dear ImGui:

Version 1.90.8, Branch: master

Back-ends:

imgui_impl_win32.cpp + imgui_impl_dx11.cpp (the question stands for other backends as well)

Compiler, OS:

Windows 11, Visual Studio 2022

Full config/build information:

Any

Details:

My Issue/Question:

Are there ImGui APIs that can throw? It would seem that there aren't? However, ImGui does not use noexcept, so maybe I'm missing a piece of information?

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

ocornut commented 2 weeks ago

Nothing does throw except maybe calls to IM_NEW() depending on your new() setup.

alien-brother commented 1 week ago

If I'm not touching anything around IM_NEW(), it cannot throw, right? By default, it seems to be doing placement new in a buffer created by malloc().

ocornut commented 1 week ago

Yes that's correct.