@@ -73,9 +73,15 @@ class LeakedObjectDetector
7373 not be this particular deletion that's at fault - the incorrect one may have happened
7474 at an earlier point in the program, and simply not been detected until now.
7575
76- Most errors like this are caused by using old-fashioned, non-RAII techniques for
77- your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays,
78- ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
76+ Many errors like this are caused by using old-fashioned, non-RAII techniques for
77+ object management. If you're seeing this, it's a good idea to double-check
78+ that you're using std::unique_ptrs, OwnedArrays,
79+ ReferenceCountedObjects, etc, and avoiding manual calls to the 'delete'
80+ operator at all costs!
81+
82+ You may also see this error if JUCE's shutdown code is called while an object
83+ containing a leak detector is still alive (perhaps declared as a namespace-scope
84+ static).
7985 */
8086 jassertfalse;
8187 }
@@ -97,9 +103,15 @@ class LeakedObjectDetector
97103 /* * If you hit this, then you've leaked one or more objects of the type specified by
98104 the 'OwnerClass' template parameter - the name should have been printed by the line above.
99105
100- If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for
101- your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays,
102- ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
106+ Many errors like this are caused by using old-fashioned, non-RAII techniques for
107+ object management. If you're seeing this, it's a good idea to double-check
108+ that you're using std::unique_ptrs, OwnedArrays,
109+ ReferenceCountedObjects, etc, and avoiding manual calls to the 'delete'
110+ operator at all costs!
111+
112+ You may also see this error if JUCE's shutdown code is called while an object
113+ containing a leak detector is still alive (perhaps declared as a namespace-scope
114+ static).
103115 */
104116 jassertfalse;
105117 }
0 commit comments