Code: Select all
{
scoped_lock... lock = buf.lock(...);
// do stuff with lock.data (or lock.pixelBox for HardwarePixelBuffer, etc)
}
Code: Select all
{
void *data = buf.lock(...);
try{
// do stuff with data
}
catch(...){
buf.unlock()
throw;
}
buf.unlock();
}