원격 메서드 호출 중에 OutOfMemoryException이 발생합니다.원격 메서드 호출 중에 OutOfMemoryException이 발생했습니다.
"RemoteEntity.SetLocalStore (DATASET);"
전달 된 값은 데이터 집합입니다.
데이터 세트의참고 크기
Envoirment 38메가바이트는 C# VS2008
감사
코드 : 나는 당신이 답을 알고 있다고 생각
private void backgroundSync_DoWork(object sender, DoWorkEventArgs e)
{
backgroundSync.ReportProgress(10, "Fetching data for sync ...");
EngagementSet _remoteSet = HKMPClient.Instance.RemoteEntity.GetLocalStore();
//Update to release memory.
HKMPClient.Instance.RemoteEntity.SetLocalStore(null);
//dispose RemoteEntity
HKMPClient.Instance.DisconnectAndDispose();
HKMP.EngagementWorks.Windows.BLL.Engagements.Engagement.MergeEntitiesInLimitedConnecitivity(_remoteSet,EngagementID);
backgroundSync.ReportProgress(10, "Synchronizing Engagement ...");
DialogSync _dlgSync = new DialogSync(this.EngagementID, _remoteSet);
_dlgSync.ServiceRequestStarted += new DialogSync.OnServiceRequestStarted(_dlgSync_ServiceRequestStarted);
_dlgSync.ServiceRequestCompleted += new DialogSync.OnServiceRequestCompleted(_dlgSync_ServiceRequestCompleted);
if (_dlgSync.IsShown())
{
_dlgSync.StartPosition = FormStartPosition.CenterParent;
_dlgSync.WindowState = FormWindowState.Normal;
_dlgSync.ShowDialog();
}
//Disposed to release object.
_dlgSync.Dispose();
_dlgSync = null;
// connect again
HKMPClient.Instance.Connect(e.Argument.ToString());
_remoteSet.RemotingFormat = SerializationFormat.Binary;
HKMPClient.Instance.RemoteEntity.SetLocalStore(_remoteSet);
}
내가 여기있는 일부 코드에서'NullReferenceException'을 얻고 있습니다. 도와 주실 수 있습니까? – jason
흥미롭게도 클라이언트 스레드를 어떻게 실행하고 있습니까? reply.code 블록이 첨부되었습니다. – leppie