Closed Bug 288781 Opened 20 years ago Closed 20 years ago

Memory leak in nsAccessibleText::DOMPointToOffset

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 288848

People

(Reporter: bzbarsky, Assigned: Louie.Zhao)

Details

(Keywords: memory-leak)

Not sure why this wasn't caught in my builds before... did this code just get
turned on?

In any case, the following line:

  nsIDOMNode* domNode = (nsIDOMNode *)domNodeArray->ElementAt(index);

leaks, given that domNodeArray is an nsISupportsArray, because ElementAt addrefs
the node before returning it.  I'd suggest using an nsCOMPtr for the node and
do_QueryElementAt; I'd also suggest using an nsIArray, with which such mistakes
cannot happen....
Hmm, this got checked in in July, 2003

1.11 <aaronl@netscape.com> 2003-07-22 12:56
Fixing bustage

It changed us from an nsIArray to an nsISupportsArray. I don't remember what the
bustage was about anymore or how this ended up being the bustage fix.
Assignee: aaronleventhal → Louie.Zhao

*** This bug has been marked as a duplicate of 288848 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.