| Author |
Message |
ilya
Joined: 30 Jul 2008 Posts: 13
|
Posted: Wed Jul 30, 2008 10:05 am Post subject: Work class question |
|
|
Hi! Should I dispose Work.ExecutionBlock after using of Work object, if I didn't use the executionBlock property?
I use a Work object to get Warnings and Sqlsqript(via ScriptObject).
But from the docs is not clear, if an object of executionBlock is also created with the Work object and should be disposed
or
it will be created only if Work.ExceutionBlock property will be used (if I write ExecutionBlock eb = work.ExecutionBlock;). |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Fri Aug 01, 2008 6:29 pm Post subject: |
|
|
Hi Ilya,
I'd say no, because the ExecutionBlock doesn't contain any data unless Work.BuildFromDifferences is run. It may be important to run Dispose() on the ExecutionBlock when it has been populated, because ExecutionBlock could potentially leave large SQL script files in your temporary files folder that really should be cleaned up.
So I would say that unless you had previously run BuildFromDifferences on the Work object, you wouldn't need to dispose the ExecutionBlock.
I hope this helps! _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
ilya
Joined: 30 Jul 2008 Posts: 13
|
Posted: Tue Aug 05, 2008 8:54 am Post subject: |
|
|
Hi Brian, thank you! it has helped!  |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group