Closed Bug 593530 Opened 10 years ago Closed 10 years ago
Device Manager is leaked if initialization fails
No description provided.
Comment on attachment 472069 [details] [diff] [review] Use nsRefPtr for mDeviceManager It's dangerous to have an nsRefPtr that's statically allocated, because we will Release and delete it at quit() time rather than when xpcom is torn down. Further, we shouldn't manually AddRef and Release an nsRefPtr. Probably the best solution here is to delete mDeviceManager before setting the pointer to nsnull if Init() fails. That's *always* a leak, and it seems like the least bad fix to a rather bad situation.
Attachment #472069 - Flags: review?(joe) → review-
We need this because, on win2k3 test machines, Direct3D 9 fails to initialize, and we then get orange on everything because we leak the device manager.
Assignee: nobody → matt.woodrow+bugzilla
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.