1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-06-13 12:01:30 +00:00
parent 94cfda5062
commit 052ac2761e
6 changed files with 17 additions and 25 deletions

View file

@ -121,16 +121,12 @@ public:
stop (false);
if (audioBuffer != 0)
juce_free (audioBuffer);
if (inputDevice != 0)
delete inputDevice;
}
void setTempBufferSize (const int numChannels, const int numSamples)
{
if (audioBuffer != 0)
juce_free (audioBuffer);
audioBuffer = (float*) juce_calloc (32 + numChannels * numSamples * sizeof (float));

View file

@ -166,7 +166,6 @@ public:
log (T("ASIO - exiting"));
removeCurrentDriver();
if (tempBuffer != 0)
juce_free (tempBuffer);
if (isUsingThread)
@ -487,7 +486,6 @@ public:
jassert (! isThreadRunning());
if (tempBuffer != 0)
juce_free (tempBuffer);
tempBuffer = (float*) juce_calloc (totalBuffers * currentBlockSizeSamples * sizeof (float) + 128);

View file

@ -1225,7 +1225,6 @@ private:
int i;
for (i = 0; i < numInputBuffers; ++i)
if (inputBuffers[i] != 0)
juce_free (inputBuffers[i]);
delete[] inputBuffers;
@ -1233,7 +1232,6 @@ private:
numInputBuffers = 0;
for (i = 0; i < numOutputBuffers; ++i)
if (outputBuffers[i] != 0)
juce_free (outputBuffers[i]);
delete[] outputBuffers;

View file

@ -250,8 +250,6 @@ public:
{
DeleteDC (dc);
DeleteObject (fontH);
if (kps)
juce_free (kps);
}
}
@ -284,12 +282,9 @@ public:
DeleteDC (dc);
DeleteObject (fontH);
if (kps != 0)
{
juce_free (kps);
kps = 0;
}
}
fontH = 0;

View file

@ -61,7 +61,6 @@ EdgeTable::EdgeTable (const EdgeTable& other) throw()
const EdgeTable& EdgeTable::operator= (const EdgeTable& other) throw()
{
if (table != 0)
juce_free (table);
top = other.top;

View file

@ -66,6 +66,12 @@ void JUCE_API initialiseJuce_NonGUI()
jassert (atomicDecrementAndReturn (n) == 1);
jassert (swapByteOrder ((uint32) 0x11223344) == 0x44332211);
// quick test to make sure the run-time lib doesn't crash on freeing a null-pointer.
SystemStats* nullPointer = 0;
juce_free (nullPointer);
delete[] nullPointer;
delete nullPointer;
#endif
// Now the real initialisation..