Closed omix closed 1 year ago
The behavior of typeid(*pointer)
to throw an exception in case of dangling pointers is windows-msvc-specific. On unix-based systems a SIGSEGV is sent and the app crashes.
Dangling pointer check on Linux/macOS works at least nearly as good as on Windows. Possibly it will detect less situations. It does definitely not work on aarch64.
In case of dangling pointer, QtJambi will throw io.qt.QDanglingPointerException
.
Programming errors may lead to internal object deletions where it is not possible to unregister the Java counterpart which then remains linked to dangling pointer. Using this object will crash the application.
In case of polymorphic object types it is possible to provoke a catchable exception by
typeid(*pointer)
thrown when pointer points to deleted object. This native exception could then be thrown as Java exception.The user should be able to switch on/off this feature.