Closed Bug 252720 Opened 20 years ago Closed 12 years ago

nsFileStream::InitWithFileDescriptor looks like a permanent cycle

Categories

(Core :: XPCOM, defect, P5)

x86
Windows XP
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: timeless, Unassigned)

Details

(Keywords: memory-leak)

nsFileStream::InitWithFileDescriptor(PRFileDesc* fd, nsISupports* parent) { NS_ENSURE_TRUE(mFD == nsnull, NS_ERROR_ALREADY_INITIALIZED); ... mParent = parent; ... } There is no code that I can find to clear mParent.
class nsFileStream : public nsISeekableStream { ... protected: nsCOMPtr<nsISupports> mParent; // strong reference to parent nsFileIO, // which ensures mFD remains valid. ... }
ok, where's the other part of the cycle? I can't find a place where this code makes mParent reference the child. So, the dtor will release the parent. (I also can't find a caller of this function...)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Assignee: dougt → nobody
QA Contact: xpcom
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.