mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
New class HeapBlock, which provides a safe and object-oriented way to allocate heap space. I've used HeapBlocks to replace almost all uses of malloc/free throughout the codebase.
This commit is contained in:
parent
8c988319ec
commit
4ed1d791e5
86 changed files with 22712 additions and 22630 deletions
|
|
@ -301,7 +301,7 @@ public:
|
|||
|
||||
if (snd_midi_event_new (maxEventSize, &midiParser) >= 0)
|
||||
{
|
||||
uint8* const buffer = (uint8*) juce_malloc (maxEventSize);
|
||||
HeapBlock <uint8> buffer (maxEventSize);
|
||||
|
||||
const int numPfds = snd_seq_poll_descriptors_count (seqHandle, POLLIN);
|
||||
struct pollfd* const pfd = (struct pollfd*) alloca (numPfds * sizeof (struct pollfd));
|
||||
|
|
@ -345,7 +345,6 @@ public:
|
|||
}
|
||||
|
||||
snd_midi_event_free (midiParser);
|
||||
juce_free (buffer);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue