>How are you handling the cloning process? If you are doing a shallow copy, then properties in both the original and cloned objects may refer to the same object. See
http://msdn.microsoft.com/en-us/library/system.object.memberwiseclone%28v=vs.90%29.aspx.
MemberwiseClone() is executing a shallow copy.
From my main App class, it is like this:
Public Class App
Implements ICloneable
Public Shared oApp As Framework.App = New Framework.App()
Public Function Clone() As Object Implements System.ICloneable.Clone
Return MyBase.MemberwiseClone()
End Function
End Class
Once I did the cloning, I applied a verification to make sure they were not referencing to the same pointer:
oProcess.oApp = App.oApp.Clone()
oApp = oProcess.oApp
oApp.CreateFile((oProcess.oApp Is App.oApp).ToString, oApp.cTempDir + "a.txt")
The result in a.txt file was False.
So, I assume the cloned object and the original one are not pointing to the same address.
Is this how you see it as well? If yes, does it still make sense I am not doing something properly? Or, could this be related to something else?