5 ms·
That example is initialization code, but you'd run into the same problem even if the control were already initialized (and you were trying to set new properties
by panic 8y ago
That example is initialization code, but you'd run into the same problem even if the control were already initialized (and you were trying to set new properties on it). In that case, you'd likely have a borrowed pointer, so it wouldn't be dropped when the panic happened.
- ordu 8y agoThe pointer can be dropped. The pointed object cannot. So the problem of rolling back the transaction changes ownership, now our button should do sensible things in setLabel, to rollback changes made before an exception.