mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-01 03:10:06 +00:00
New class: ScopedPointer, which auto-releases a pointer when it goes out of scope. I've used this extensively to replace a lot of pointer deletions with more RAII-style patterns.
This commit is contained in:
parent
4ed1d791e5
commit
c22c06c80c
126 changed files with 1454 additions and 1838 deletions
|
|
@ -108,7 +108,7 @@ void ImageConvolutionKernel::applyToImage (Image& destImage,
|
|||
int dw,
|
||||
int dh) const
|
||||
{
|
||||
Image* imageCreated = 0;
|
||||
ScopedPointer <Image> imageCreated;
|
||||
|
||||
if (sourceImage == 0)
|
||||
{
|
||||
|
|
@ -255,8 +255,6 @@ void ImageConvolutionKernel::applyToImage (Image& destImage,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete imageCreated;
|
||||
}
|
||||
|
||||
END_JUCE_NAMESPACE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue