Tidy up delete of object with correct deconstructors and delete
This commit is contained in:
parent
26bb912646
commit
e91c31b44a
@ -103,10 +103,10 @@ OCLStream<T>::OCLStream(const unsigned int ARRAY_SIZE, const int device_index)
|
|||||||
template <class T>
|
template <class T>
|
||||||
OCLStream<T>::~OCLStream()
|
OCLStream<T>::~OCLStream()
|
||||||
{
|
{
|
||||||
delete[] copy_kernel;
|
delete copy_kernel;
|
||||||
delete[] mul_kernel;
|
delete mul_kernel;
|
||||||
delete[] add_kernel;
|
delete add_kernel;
|
||||||
delete[] triad_kernel;
|
delete triad_kernel;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|||||||
@ -8,6 +8,9 @@ template <class T>
|
|||||||
class Stream
|
class Stream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
virtual ~Stream(){}
|
||||||
|
|
||||||
// Kernels
|
// Kernels
|
||||||
// These must be blocking calls
|
// These must be blocking calls
|
||||||
virtual void copy() = 0;
|
virtual void copy() = 0;
|
||||||
|
|||||||
@ -154,7 +154,7 @@ void run()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete[] stream;
|
delete stream;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user