How to release resources (buffers, queues etc.)?

Discussion created by dravisher on Mar 20, 2010
Latest reply on Oct 17, 2010 by cjang
Using C++ bindings

Hello. I am having trouble releasing resources in my host application using the C++ bindings. Using for instance Buffer_Settings.release() yields an error message like what is attached. This is using Visual Studio 2008 with latest drivers and SDK.

Am I doing it wrong? Is there a different syntax for releasing resources in the C++ bindings? The samples never do this (at least not the C++ samples), so I haven't been able to find any example code.

1>.\4411p1aOCL.cpp(335) : error C2248: 'cl::detail::Wrapper<T>::release' : cannot access protected member declared in class 'cl::detail::Wrapper<T>' 1> with 1> [ 1> T=cl_mem 1> ] 1> C:\Program Files (x86)\ATI Stream\include\CL/cl.hpp(1128) : see declaration of 'cl::detail::Wrapper<T>::release' 1> with 1> [ 1> T=cl_mem 1> ]