New Posts New Posts RSS Feed: Dispose of EntityManager
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Dispose of EntityManager

 Post Reply Post Reply
Author
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Topic: Dispose of EntityManager
    Posted: 07-Oct-2010 at 11:04am

An Entity Manager will be taken care of by the Garbage Collection once there are not references to it.

Yet, if you want to be extra cautious, you could do;
 
_entityManager.Clear();
_entityManager = null;
 
Be sure not to have any references to _entityManager (UI, etc).
Back to Top
cjohnson84 View Drop Down
Groupie
Groupie


Joined: 24-Sep-2009
Location: Akron, Ohio
Posts: 44
Post Options Post Options   Quote cjohnson84 Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2010 at 10:16am
What's the recommended way to completely dispose of an Entity Manager once you're finished with it?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down