CCCoreLib 31 May 2022
CloudCompare Core algorithms
Public Member Functions | Public Attributes | List of all members
CCCoreLib::Garbage< C > Class Template Reference

Garbage container (automatically deletes pointers when destroyed) More...

#include <Garbage.h>

Collaboration diagram for CCCoreLib::Garbage< C >:
Collaboration graph
[legend]

Public Member Functions

void add (C *item)
 Puts an item in the trash.
 
void remove (C *item)
 Removes an item from the trash. More...
 
void destroy (C *item)
 To manually delete an item already in the trash.
 
 ~Garbage ()
 Destructor. More...
 

Public Attributes

std::unordered_set< C * > m_items
 Items to delete.
 

Detailed Description

template<typename C>
class CCCoreLib::Garbage< C >

Garbage container (automatically deletes pointers when destroyed)

Constructor & Destructor Documentation

◆ ~Garbage()

template<typename C >
CCCoreLib::Garbage< C >::~Garbage ( )
inline

Destructor.

Automatically deletes all items

Member Function Documentation

◆ remove()

template<typename C >
void CCCoreLib::Garbage< C >::remove ( C *  item)
inline

Removes an item from the trash.

Warning
The item won't be destroyed!

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