Closed Bug 92535 Opened 25 years ago Closed 19 years ago

nsCommandGroup.cpp should use nsAutoVoidArray

Categories

(Core Graveyard :: Embedding: APIs, defect, P4)

x86
All

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.2alpha

People

(Reporter: jesup, Assigned: mjudge)

References

Details

(Keywords: perf)

nsCommandGroup.cpp uses nsVoidArray where nsAutoVoidArray would avoid allocations. Typically it's used where it new's an nsVoidArray, then appends an element to it. nsAutoVoidArray would avoid an allocation in many/most cases.
Blocks: 92256
Keywords: perf
CC'ing sfraser for opinion on the memory/performance tradeoff of switching to nsAutoVoidArray. It looks reasonable enough to me.
Sure. This code isn't used yet. tho.
Assignee: adamlock → sfraser
Simon, I am putting this in the 1.0 milestone, if you want it in a different milestone, just move it
Priority: -- → P4
Target Milestone: --- → mozilla1.0
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 (you can query for this string to delete spam or retrieve the list of bugs I've moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Pre-sabbatical bug triage.
Target Milestone: mozilla1.0.1 → mozilla1.2alpha
-> mjudge
Assignee: sfraser → mjudge
This bug can be closed as nsCommandGroup does seem to use nsAutoVoidArray: http://lxr.mozilla.org/mozilla/source/embedding/components/commandhandler/src/nsCommandGroup.cpp#263 263 nsVoidArray* commandList; 264 if ((commandList = (nsVoidArray *)mGroupsHash.Get(&groupKey)) == nsnull) 265 { 266 // make this list 267 commandList = new nsAutoVoidArray;
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.