Je récupère OutOfMemoryException lors d'un appel de méthode à distance.OutOfMemoryException lors d'un appel de méthode à distance
"RemoteEntity.SetLocalStore (DATASET);"
La valeur transmise est un jeu de données.
Remarque Taille du jeu de données est 38MB
envoirment C# VS2008
Merci
code:
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);
}
Je reçois 'NullReferenceException' dans un code que j'ai ici, pouvez-vous me aider? – jason
Par souci d'intérêt, comment les threads client avez-vous en cours d'exécution? – leppie