leaking nsIRegions in nsViewManager::ProcessPendingUpdates() when region is empty. Duh! Switched to nsCOMPtr.

This commit is contained in:
beard%netscape.com 1999-09-27 17:48:33 +00:00
Родитель 854aa7f8a3
Коммит ff9ac41de5
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -1310,12 +1310,11 @@ void nsViewManager :: UpdateDirtyViews(nsIView *aView, nsRect *aParentRect) cons
void nsViewManager::ProcessPendingUpdates(nsIView* aView)
{
nsIRegion* dirtyRegion = nsnull;
aView->GetDirtyRegion(dirtyRegion);
nsCOMPtr<nsIRegion> dirtyRegion;
aView->GetDirtyRegion(*getter_AddRefs(dirtyRegion));
if (dirtyRegion != nsnull && !dirtyRegion->IsEmpty()) {
UpdateView(aView, dirtyRegion, 0);
dirtyRegion->Init();
NS_RELEASE(dirtyRegion);
}
// process pending updates in child view.