std::auto_ptr used wrong

Bug #549317 reported by Jonas No
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Krzysztof Kosinski

Bug Description

std::auto_ptr can't be used with arrays, example:

"std::auto_ptr<char> bad( new char[100] );"

std::auto_ptr use "delete ptr" and _not_ "delete [] ptr"

Location found:
RELEASE_0_47_PRE4_BRANCH/src/libnrtype/FontInstance.cpp
Line: 461

and since it's used there you should search the whole project for more of the same bug

side note: boost have a scoped array class that can be used (or you can make your own version, usually not recommended)

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Thanks, fixed in Bazaar r9240.
This seems to be the only instance of such wrong use.

Changed in inkscape:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Krzysztof Kosinski (tweenk)
milestone: none → 0.48
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.