openshot-audio  0.1.5
Public Member Functions | Protected Member Functions | Friends | List of all members
SingleThreadedReferenceCountedObject Class Reference

#include <juce_ReferenceCountedObject.h>

Inheritance diagram for SingleThreadedReferenceCountedObject:
Expression::Term PopupMenu::CustomComponent RenderingHelpers::ClipRegions< SavedStateType >::Base Expression::Helpers::BinaryTerm Expression::Helpers::Constant Expression::Helpers::Function Expression::Helpers::Negate Expression::Helpers::SymbolTerm PopupMenu::HelperClasses::HeaderItemComponent PopupMenu::HelperClasses::NormalComponentWrapper Toolbar::MissingItemsComponent RenderingHelpers::ClipRegions< SavedStateType >::EdgeTableRegion RenderingHelpers::ClipRegions< SavedStateType >::RectangleListRegion

Public Member Functions

void incReferenceCount () noexcept
 
void decReferenceCount () noexcept
 
bool decReferenceCountWithoutDeleting () noexcept
 
int getReferenceCount () const noexcept
 

Protected Member Functions

 SingleThreadedReferenceCountedObject ()
 
virtual ~SingleThreadedReferenceCountedObject ()
 

Friends

struct ContainerDeletePolicy< ReferenceCountedObject >
 

Detailed Description

Adds reference-counting to an object.

This is effectively a version of the ReferenceCountedObject class, but which uses a non-atomic counter, and so is not thread-safe (but which will be more efficient). For more details on how to use it, see the ReferenceCountedObject class notes.

See also
ReferenceCountedObject, ReferenceCountedObjectPtr, ReferenceCountedArray

Constructor & Destructor Documentation

◆ SingleThreadedReferenceCountedObject()

SingleThreadedReferenceCountedObject::SingleThreadedReferenceCountedObject ( )
inlineprotected

Creates the reference-counted object (with an initial ref count of zero).

◆ ~SingleThreadedReferenceCountedObject()

virtual SingleThreadedReferenceCountedObject::~SingleThreadedReferenceCountedObject ( )
inlineprotectedvirtual

Destructor.

Member Function Documentation

◆ decReferenceCount()

void SingleThreadedReferenceCountedObject::decReferenceCount ( )
inlinenoexcept

Decreases the object's reference count. If the count gets to zero, the object will be deleted.

◆ decReferenceCountWithoutDeleting()

bool SingleThreadedReferenceCountedObject::decReferenceCountWithoutDeleting ( )
inlinenoexcept

Decreases the object's reference count. If the count gets to zero, the object will not be deleted, but this method will return true, allowing the caller to take care of deletion.

◆ getReferenceCount()

int SingleThreadedReferenceCountedObject::getReferenceCount ( ) const
inlinenoexcept

Returns the object's current reference count.

◆ incReferenceCount()

void SingleThreadedReferenceCountedObject::incReferenceCount ( )
inlinenoexcept

Increments the object's reference count.

This is done automatically by the smart pointer, but is public just in case it's needed for nefarious purposes.

Friends And Related Function Documentation

◆ ContainerDeletePolicy< ReferenceCountedObject >


The documentation for this class was generated from the following file: