Fix leaks. Allocate CUDA memory only once. Free allocations when Compressor is destroyed.
This commit is contained in:
@ -24,6 +24,10 @@
|
||||
#ifndef NV_TT_COMPRESSOR_H
|
||||
#define NV_TT_COMPRESSOR_H
|
||||
|
||||
#include <nvcore/Ptr.h>
|
||||
|
||||
#include <nvtt/cuda/CudaCompressDXT.h>
|
||||
|
||||
#include "nvtt.h"
|
||||
|
||||
namespace nv
|
||||
@ -63,6 +67,9 @@ namespace nvtt
|
||||
|
||||
bool cudaSupported;
|
||||
bool cudaEnabled;
|
||||
|
||||
nv::AutoPtr<nv::CudaCompressor> cuda;
|
||||
|
||||
};
|
||||
|
||||
} // nvtt namespace
|
||||
|
Reference in New Issue
Block a user