This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello. In my porting from a winforms application based on ADO.Net strongly typed datasets to LightSpeed I am suffering several problems. One of them is the infamous System.ObjectDisposedException: Can't obtain access to disposed object. System.ObjectDisposedException en Mindscape.LightSpeed.UnitOfWorkBase. () en Mindscape.LightSpeed.UnitOfWorkBase.Find(Query query) .... 'OstedModel' is the name of the class derived from UnitOfWork. It seems that sometimes these objects (my units of work) are disposed and being accessed later, but I can't explain how this is possible, I only dispose these object when closing certain forms. I will overrode UnitOfWork.OnDisposed() to track when and where these objects are disposed. Can LightSpeed call UnitOfWork.Dispose() by any reason?
Thank you. |
|
|
LightSpeed sometimes creates units of work internally, and disposes those. I don't think there's any occasion where we dispose a unit of work created by application code. |
|