Closed Tom94 closed 2 years ago
Hi @Tom94,
indeed, there are some reference counting issues involving the Screen at the moment. It's related to a reference cycle involving the RenderPass
. It's on my TODO list but may take some time to get to. I'd suggest that you use your workaround for now.
-W
FYI, this reference cycle issue is now fixed in on master
. For details, see https://github.com/mitsuba-renderer/nanogui/commit/77b8d98a90223d6e0eb72188a619fbb153ef6c47 and https://github.com/mitsuba-renderer/nanogui/commit/e3dcfc51a9473d71e8cfb4e7f3020c6219051e03.
I noticed that on the latest version of nanogui, the
Screen
object (and its inheriting example applications) are never destructed. Is this intentional?Destroying an application manually leads to a hard-crash with some reference counts dipping below zero.
For now, my workaround is to never destroy my application and to instead put all necessary cleanup into
main()
. But that seems a little hacky.Related question: what is the purpose of the
inc_ref
anddec_ref
calls in example1.cpp? Exception-related? If so, why are they not present in all other examples?