#1 :
using (doc.LockDocument())
{
.... some code ...
}
#2 :
DocumentLock loc = doc.LockDocument();
... some code ...
loc.Dispose()
Does #1 is more reliable than #2 since there is no need to dispose of the lock ?
Also, if I use #2 and something goes wrong in the code and the loc.Dispose() is not being done, is there a way in Autocad to know wich command is stuck ?
And is there a command that would cancel any lock that would not have been dispose ?