Hello Sukrut, I think that the TestDisposableContext method is wrong, as MyCustGroupContext.dispose() method is never invoked. The correct version IMHO should be: class TestDisposableContext { public static void main(Args _args) { CustGroup custgroup; CustGroup = CustGroup::find('50' ); using (var MyCustGroupContext = new MyCustGroupContext()) { MyCustGroupContext.deleteRecord = true; if (CustGroup) { ttsbegin; CustGroup.selectForUpdate(true); CustGroup.delete(); ttscommit; } } } }