diff --git a/ComputingServices/ComputingServices/Taskhost.d/Object/ShadowsCopy.vb b/ComputingServices/ComputingServices/Taskhost.d/Object/ShadowsCopy.vb
index f78b266..99661ed 100644
--- a/ComputingServices/ComputingServices/Taskhost.d/Object/ShadowsCopy.vb
+++ b/ComputingServices/ComputingServices/Taskhost.d/Object/ShadowsCopy.vb
@@ -6,7 +6,7 @@ Namespace TaskHost
Module ShadowsCopy
'''
- '''
+ ''' 将客户端上面的对象数据复制到远程主机上面的内存管理模块之中
'''
''' Client上面的
''' 服务器上面的
@@ -20,9 +20,9 @@ Namespace TaskHost
'''
'''
'''
- '''
- '''
- ''' Avoided of the loop reference
+ ''' 远程服务器上面的对象
+ ''' 远程对象的内存管理模块
+ ''' Avoided of the loop reference.(内存管理的复制堆栈记录)
'''
Private Function __innerCopy(from As Object, target As Object, memory As MemoryHash, stack As List(Of Long)) As Boolean
Dim props As PropertyInfo() = from.GetType.GetReadWriteProperties
@@ -33,14 +33,13 @@ Namespace TaskHost
If BasicTypesFlushs.ContainsKey(prop.PropertyType) Then
Call prop.SetValue(target, value) ' 值类型,直接复制
Else ' 引用类型,递归按址复制
- Dim addr = ObjectAddress.AddressOf(value)
+ Dim addr As ObjectAddress = ObjectAddress.AddressOf(value) ' 得到对象在内存之中的位置指针
If memory.IsNull(addr.ReferenceAddress) Then
- ' 空的,则直接插入
- Call memory.SetObject(value)
+ Call memory.SetObject(value) ' 空的,则直接插入
Else
Dim innerTarget As Object = prop.GetValue(target)
- addr = ObjectAddress.AddressOf(innerTarget)
+ addr = ObjectAddress.AddressOf(innerTarget) ' 假若是引用类型的对象,在复制的时候还需要检查栈空间,否则会出现死循环 栈空间溢出
' 检查栈空间是否已经复制过当前的对象了?
If stack.IndexOf(addr.ReferenceAddress) = -1 Then ' 假若出现循环引用的话,应该怎样进行复制??