It is hard to see the lifetime of m_pVamp. Are the early deletes in case of errors really required? I would prefer only delete it here.