diff options
Diffstat (limited to 'src/MarginView.cxx')
| -rw-r--r-- | src/MarginView.cxx | 18 | 
1 files changed, 6 insertions, 12 deletions
| diff --git a/src/MarginView.cxx b/src/MarginView.cxx index 27bf1e10d..e371a4891 100644 --- a/src/MarginView.cxx +++ b/src/MarginView.cxx @@ -102,21 +102,15 @@ void DrawWrapMarker(Surface *surface, PRectangle rcPlace,  }  MarginView::MarginView() { -	pixmapSelMargin = 0; -	pixmapSelPattern = 0; -	pixmapSelPatternOffset1 = 0;  	wrapMarkerPaddingRight = 3;  	customDrawWrapMarker = NULL;  }  void MarginView::DropGraphics(bool freeObjects) {  	if (freeObjects) { -		delete pixmapSelMargin; -		pixmapSelMargin = 0; -		delete pixmapSelPattern; -		pixmapSelPattern = 0; -		delete pixmapSelPatternOffset1; -		pixmapSelPatternOffset1 = 0; +		pixmapSelMargin.reset(); +		pixmapSelPattern.reset(); +		pixmapSelPatternOffset1.reset();  	} else {  		if (pixmapSelMargin)  			pixmapSelMargin->Release(); @@ -129,11 +123,11 @@ void MarginView::DropGraphics(bool freeObjects) {  void MarginView::AllocateGraphics(const ViewStyle &vsDraw) {  	if (!pixmapSelMargin) -		pixmapSelMargin = Surface::Allocate(vsDraw.technology); +		pixmapSelMargin.reset(Surface::Allocate(vsDraw.technology));  	if (!pixmapSelPattern) -		pixmapSelPattern = Surface::Allocate(vsDraw.technology); +		pixmapSelPattern.reset(Surface::Allocate(vsDraw.technology));  	if (!pixmapSelPatternOffset1) -		pixmapSelPatternOffset1 = Surface::Allocate(vsDraw.technology); +		pixmapSelPatternOffset1.reset(Surface::Allocate(vsDraw.technology));  }  void MarginView::RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw) { | 
