Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.3.0 Alpha
-
None
Description
QList uses inline new and delete which can cause memory problems, especially when linking dynamically to Qt. There's a discussion here about the actual problem, please see the last few comments: QTBUG-7884
This bug allows objects to be created on one side of the DLL boundary (Qt libs) but destroyed on the other (linked main program). As noted in QTBUG-7884, if a program that links to Qt defines its own allocators, there can be a mismatch of memory handlers, resulting in Qt handling the new, but a user-defined allocator handling the delete.
Besides the inherent riskiness of de/allocating memory across DLL boundaries, many Qt users (my company included) redefine their own new and delete operators. This can cause very hard to find errors when dynamically linking against Qt. The following bug might be caused by the same issue: QTBUG-18904
Attachments
Issue Links
- relates to
-
QTBUG-64871 new and delete calls used in QList header (template) leading to memory allocator mismatch in client code - and crash
-
- Closed
-