openshot-audio  0.1.5
Macros | Functions
juce_Memory.h File Reference

Go to the source code of this file.

Macros

#define JUCE_MEMORY_H_INCLUDED
 
#define JUCE_AUTORELEASEPOOL
 
#define JUCE_AUTORELEASEPOOL
 
#define juce_UseDebuggingNewOperator
 

Functions

void zeromem (void *memory, size_t numBytes) noexcept
 
template<typename Type >
void zerostruct (Type &structure) noexcept
 
template<typename Type >
void deleteAndZero (Type &pointer)
 
template<typename Type , typename IntegerType >
Type * addBytesToPointer (Type *basePointer, IntegerType bytes) noexcept
 
template<typename Type1 , typename Type2 >
int getAddressDifference (Type1 *pointer1, Type2 *pointer2) noexcept
 
template<class Type >
Type * createCopyIfNotNull (const Type *objectToCopy)
 
template<typename Type >
Type readUnaligned (const void *srcPtr) noexcept
 
template<typename Type >
void writeUnaligned (void *dstPtr, Type value) noexcept
 

Macro Definition Documentation

◆ JUCE_AUTORELEASEPOOL [1/2]

#define JUCE_AUTORELEASEPOOL

◆ JUCE_AUTORELEASEPOOL [2/2]

#define JUCE_AUTORELEASEPOOL

◆ JUCE_MEMORY_H_INCLUDED

#define JUCE_MEMORY_H_INCLUDED

◆ juce_UseDebuggingNewOperator

#define juce_UseDebuggingNewOperator

(Deprecated) This was a Windows-specific way of checking for object leaks - now please use the JUCE_LEAK_DETECTOR instead.

Function Documentation

◆ addBytesToPointer()

template<typename Type , typename IntegerType >
Type* addBytesToPointer ( Type *  basePointer,
IntegerType  bytes 
)
inlinenoexcept

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,

◆ createCopyIfNotNull()

template<class Type >
Type* createCopyIfNotNull ( const Type *  objectToCopy)
inline

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.

◆ deleteAndZero()

template<typename Type >
void deleteAndZero ( Type &  pointer)
inline

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!

◆ getAddressDifference()

template<typename Type1 , typename Type2 >
int getAddressDifference ( Type1 *  pointer1,
Type2 *  pointer2 
)
inlinenoexcept

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.

◆ readUnaligned()

template<typename Type >
Type readUnaligned ( const void *  srcPtr)
inlinenoexcept

A handy function to read un-aligned memory without a performance penalty or bus-error.

◆ writeUnaligned()

template<typename Type >
void writeUnaligned ( void *  dstPtr,
Type  value 
)
inlinenoexcept

A handy function to write un-aligned memory without a performance penalty or bus-error.

◆ zeromem()

void zeromem ( void *  memory,
size_t  numBytes 
)
inlinenoexcept

Fills a block of memory with zeros.

◆ zerostruct()

template<typename Type >
void zerostruct ( Type &  structure)
inlinenoexcept

Overwrites a structure or object with zeros.