From: Dmitry A. <fd...@ua...> - 2004-03-26 13:00:26
|
Hello Carlos, Friday, March 26, 2004, 2:23:27 PM, you wrote: CGÁ> When the transaction is committed ( or rollbacked ) the Transacion CGÁ> property of all the commands is being set to null, i have done some CGÁ> changes in my local tree for make this in the same way. It's very good, and important! Because Transaction properties pointed to finished transactions, disturb garbage collection, even if i'm call FbTransaction.Dispose! And we got more chance for memory leak. Situation very similars with situation with databindings: [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/databinding_winforms10_11.asp] [Always Call DataBindings.Clear when Disposing This is a habit that's worth getting into in order to avoid a problem with versions 1.0 and 1.1 of the .NET Framework. When disposing a data-bound Form, recurse into its Controls and clear their DataBindings collections. If you know which properties of which controls are bound, then there is a more selective method that I'll go into shortly. The problem I mentioned has to do with bound objects not being garbage-collected. Technically speaking, this is not a memory leak because references on the objects are held by an internal .NET Framework class. However, given that the application code releases all of its references, for all intents and purposes, the objects are leaked for the lifetime of the application domain.] CGÁ> I will try to commit them this weekend. Beautiful :) CGÁ> Another thing i have noticed is that the SqlCommandBuilder doesn't CGÁ> generate commands with transactions when the Transaction property of the CGÁ> DataAdapter.SelectCommand is canged ( commitedrollbacked and started a CGÁ> new one ), in this case i will be updating the transaction property CGÁ> always ( if not the insert, delete, update will raise an exception CGÁ> because there are a transaction started and the command is being CGÁ> executed without one ). Thanks to Dimitry Azaraev for his help on this CGÁ> CommandBuilder issue. Hummmm... i'm don't know how reply for this ;) I'm using it's issue -- it's 1 row of source code, and if it's not supported ==> first way ==> 2 rows thru RefreshSchema what's is not good. and second way ==> manual dataadapter configure ~10-15 rows :) I think that is too good, and before this behaivour Firebird Data Provider support correctly. So these change absolutely correct. -- Best regards, Dmitry mailto:fd...@ua... |