MusicChunkPtr: managed MusicChunk pointer
Make all uses of MusicChunk safe.
This commit is contained in:
@@ -20,11 +20,10 @@
|
||||
#ifndef MPD_MUSIC_BUFFER_HXX
|
||||
#define MPD_MUSIC_BUFFER_HXX
|
||||
|
||||
#include "MusicChunkPtr.hxx"
|
||||
#include "util/SliceBuffer.hxx"
|
||||
#include "thread/Mutex.hxx"
|
||||
|
||||
struct MusicChunk;
|
||||
|
||||
/**
|
||||
* An allocator for #MusicChunk objects.
|
||||
*/
|
||||
@@ -71,7 +70,7 @@ public:
|
||||
* @return an empty chunk or nullptr if there are no chunks
|
||||
* available
|
||||
*/
|
||||
MusicChunk *Allocate() noexcept;
|
||||
MusicChunkPtr Allocate() noexcept;
|
||||
|
||||
/**
|
||||
* Returns a chunk to the buffer. It can be reused by
|
||||
|
||||
Reference in New Issue
Block a user