1

I am running a report in a WinForms application using the report viewer in Local mode. The problem I'm running into is that from the report I'm accessing an object that was created using the Singleton pattern; this object is instanciated and initialized when the WinForms application launches but the report creates a new instance because it does not see that the instance was already created by the WinForms application.

Any ideas what could be happening? Thanks

Darsegura
  • 145
  • 2
  • 6

1 Answers1

1

After doing some more research I found that the ReportViewer does run under a separate AppDomain; this means that a new instance of the Singleton class will be created as the memory space used by the static instance is per AppDomain

Darsegura
  • 145
  • 2
  • 6