JUCE
|
Classes | |
class | ScopedAutoReleasePool |
A handy C++ wrapper that creates and deletes an NSAutoreleasePool object using RAII. More... | |
Macros | |
#define | JUCE_AUTORELEASEPOOL @autoreleasepool |
A macro that can be used to easily declare a local ScopedAutoReleasePool object for RAII-based obj-C autoreleasing. More... | |
#define | juce_UseDebuggingNewOperator |
(Deprecated) This was a Windows-specific way of checking for object leaks - now please use the JUCE_LEAK_DETECTOR instead. More... | |
Functions | |
void | zeromem (void *memory, size_t numBytes) noexcept |
Fills a block of memory with zeros. More... | |
template<typename Type > | |
void | zerostruct (Type &structure) noexcept |
Overwrites a structure or object with zeros. More... | |
template<typename Type > | |
void | deleteAndZero (Type &pointer) |
Delete an object pointer, and sets the pointer to null. More... | |
template<typename Type , typename IntegerType > | |
Type * | addBytesToPointer (Type *basePointer, IntegerType bytes) noexcept |
A handy function which adds a number of bytes to any type of pointer and returns the result. More... | |
template<typename Type1 , typename Type2 > | |
int | getAddressDifference (Type1 *pointer1, Type2 *pointer2) noexcept |
A handy function which returns the difference between any two pointers, in bytes. More... | |
template<class Type > | |
Type * | createCopyIfNotNull (const Type *objectToCopy) |
If a pointer is non-null, this returns a new copy of the object that it points to, or safely returns nullptr if the pointer is null. More... | |
template<typename Type > | |
Type | readUnaligned (const void *srcPtr) noexcept |
A handy function to read un-aligned memory without a performance penalty or bus-error. More... | |
template<typename Type > | |
void | writeUnaligned (void *dstPtr, Type value) noexcept |
A handy function to write un-aligned memory without a performance penalty or bus-error. More... | |
#define JUCE_AUTORELEASEPOOL @autoreleasepool |
A macro that can be used to easily declare a local ScopedAutoReleasePool object for RAII-based obj-C autoreleasing.
Because this may use the @autoreleasepool syntax, you must follow the macro with a set of braces to mark the scope of the pool.
#define juce_UseDebuggingNewOperator |
(Deprecated) This was a Windows-specific way of checking for object leaks - now please use the JUCE_LEAK_DETECTOR instead.
|
noexcept |
Fills a block of memory with zeros.
Referenced by HeapBlock< ObjectClass * >::clear(), AudioUnitHelpers::clearAudioBuffer(), AudioFormatReader::clearSamplesBeyondAvailableLength(), and AudioUnitHelpers::CoreAudioBufferList::reset().
|
noexcept |
Overwrites a structure or object with zeros.
void deleteAndZero | ( | Type & | pointer | ) |
Delete an object pointer, and sets the pointer to null.
Remember that it's not good c++ practice to use delete directly - always try to use a ScopedPointer or other automatic lifetime-management system rather than resorting to deleting raw pointers!
Referenced by operator!=().
|
noexcept |
A handy function which adds a number of bytes to any type of pointer and returns the result.
This can be useful to avoid casting pointers to a char* and back when you want to move them by a specific number of bytes,
Referenced by String::appendCharPointer(), AudioData::ConverterInstance< SourceSampleType, DestSampleType >::convertSamples(), AudioFormatReader::ReadHelper< DestSampleType, SourceSampleType, SourceEndianness >::read(), MemoryMappedAudioFormatReader::sampleToPointer(), MemoryMappedAudioFormatReader::scanMinAndMaxInterleaved(), and AudioFormatWriter::WriteHelper< DestSampleType, SourceSampleType, DestEndianness >::write().
|
noexcept |
A handy function which returns the difference between any two pointers, in bytes.
The address of the second pointer is subtracted from the first, and the difference in bytes is returned.
Referenced by CharacterFunctions::copyWithDestByteLimit().
Type* createCopyIfNotNull | ( | const Type * | objectToCopy | ) |
If a pointer is non-null, this returns a new copy of the object that it points to, or safely returns nullptr if the pointer is null.
Referenced by OwnedArray< MidiBuffer >::addCopiesOf(), and ScopedPointer< ListViewport >::createCopy().
|
noexcept |
A handy function to read un-aligned memory without a performance penalty or bus-error.
|
noexcept |
A handy function to write un-aligned memory without a performance penalty or bus-error.