Fix leaks. Allocate CUDA memory only once. Free allocations when Compressor is destroyed.

This commit is contained in:
castano
2008-02-14 05:08:26 +00:00
parent 03cfa2d793
commit 14ae88bb06
5 changed files with 143 additions and 85 deletions

View File

@ -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