mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
Couple of small fixes for mac midi and win32 threads, and fixed a memory leak in the demo app.
This commit is contained in:
parent
d6e3576234
commit
a8a602f7a2
4 changed files with 13 additions and 12 deletions
|
|
@ -35,6 +35,7 @@ public:
|
|||
{
|
||||
setOpaque (true);
|
||||
averageTime = 0;
|
||||
svgDrawable = 0;
|
||||
|
||||
rgbImage = ImageFileFormat::loadFrom (RenderingTestComponent::demoJpeg_jpg, RenderingTestComponent::demoJpeg_jpgSize);
|
||||
argbImage = ImageFileFormat::loadFrom (RenderingTestComponent::demoPng_png, RenderingTestComponent::demoPng_pngSize);
|
||||
|
|
@ -334,7 +335,7 @@ private:
|
|||
|
||||
void createSVGDrawable()
|
||||
{
|
||||
svgDrawable = 0;
|
||||
deleteAndZero (svgDrawable);
|
||||
|
||||
MemoryInputStream iconsFileStream (BinaryData::icons_zip, BinaryData::icons_zipSize, false);
|
||||
ZipFile icons (&iconsFileStream, false);
|
||||
|
|
|
|||
|
|
@ -234198,7 +234198,7 @@ bool InterProcessLock::enter (const int timeOutMillisecs) throw()
|
|||
{
|
||||
if (reentrancyLevel++ == 0)
|
||||
{
|
||||
internal = CreateMutex (0, TRUE, name);
|
||||
internal = CreateMutex (0, TRUE, "Global\\" + name);
|
||||
|
||||
if (internal != 0 && GetLastError() == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
|
|
@ -264828,8 +264828,8 @@ static bool makeSureClientExists()
|
|||
class MidiPortAndEndpoint
|
||||
{
|
||||
public:
|
||||
MidiPortAndEndpoint (MIDIPortRef port, MIDIEndpointRef endpoint) throw()
|
||||
: port (port), endPoint (endpoint)
|
||||
MidiPortAndEndpoint (MIDIPortRef port_, MIDIEndpointRef endPoint_) throw()
|
||||
: port (port_), endPoint (endPoint_)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -264838,7 +264838,7 @@ public:
|
|||
if (port != 0)
|
||||
MIDIPortDispose (port);
|
||||
|
||||
if (endPoint != 0)
|
||||
if (port == 0 && endPoint != 0) // if port == 0, it means we created the endpoint, so it's safe to delete it
|
||||
MIDIEndpointDispose (endPoint);
|
||||
}
|
||||
|
||||
|
|
@ -272540,8 +272540,8 @@ static bool makeSureClientExists()
|
|||
class MidiPortAndEndpoint
|
||||
{
|
||||
public:
|
||||
MidiPortAndEndpoint (MIDIPortRef port, MIDIEndpointRef endpoint) throw()
|
||||
: port (port), endPoint (endpoint)
|
||||
MidiPortAndEndpoint (MIDIPortRef port_, MIDIEndpointRef endPoint_) throw()
|
||||
: port (port_), endPoint (endPoint_)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -272550,7 +272550,7 @@ public:
|
|||
if (port != 0)
|
||||
MIDIPortDispose (port);
|
||||
|
||||
if (endPoint != 0)
|
||||
if (port == 0 && endPoint != 0) // if port == 0, it means we created the endpoint, so it's safe to delete it
|
||||
MIDIEndpointDispose (endPoint);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -236,8 +236,8 @@ static bool makeSureClientExists()
|
|||
class MidiPortAndEndpoint
|
||||
{
|
||||
public:
|
||||
MidiPortAndEndpoint (MIDIPortRef port, MIDIEndpointRef endpoint) throw()
|
||||
: port (port), endPoint (endpoint)
|
||||
MidiPortAndEndpoint (MIDIPortRef port_, MIDIEndpointRef endPoint_) throw()
|
||||
: port (port_), endPoint (endPoint_)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ public:
|
|||
if (port != 0)
|
||||
MIDIPortDispose (port);
|
||||
|
||||
if (endPoint != 0)
|
||||
if (port == 0 && endPoint != 0) // if port == 0, it means we created the endpoint, so it's safe to delete it
|
||||
MIDIEndpointDispose (endPoint);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ bool InterProcessLock::enter (const int timeOutMillisecs) throw()
|
|||
{
|
||||
if (reentrancyLevel++ == 0)
|
||||
{
|
||||
internal = CreateMutex (0, TRUE, name);
|
||||
internal = CreateMutex (0, TRUE, "Global\\" + name);
|
||||
|
||||
if (internal != 0 && GetLastError() == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue