System.Data.SQLite

Check-in [db65a60fcf]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix SQLiteCommand object disposal issue revealed by the previous check-in.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | marshalFixes
Files: files | file ages | folders
SHA1: db65a60fcfcf977a692709aa44222baf2c4fc687
User & Date: mistachkin 2013-07-15 05:54:19.963
Context
2013-07-15
06:53
Add virtual table test to cover the marshalling performed with xBestIndex. check-in: e1483fef81 user: mistachkin tags: marshalFixes
05:54
Fix SQLiteCommand object disposal issue revealed by the previous check-in. check-in: db65a60fcf user: mistachkin tags: marshalFixes
05:16
Modify classes implementing the IDisposable pattern to set the disposed flag after their base classes have been disposed. check-in: db3a299625 user: mistachkin tags: marshalFixes
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite/SQLiteCommand.cs.
182
183
184
185
186
187
188


189
190
191
192
193
194
195

    /// <summary>
    /// Disposes of the command and clears all member variables
    /// </summary>
    /// <param name="disposing">Whether or not the class is being explicitly or implicitly disposed</param>
    protected override void Dispose(bool disposing)
    {


        try
        {
            if (!disposed)
            {
                if (disposing)
                {
                    ////////////////////////////////////







>
>







182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

    /// <summary>
    /// Disposes of the command and clears all member variables
    /// </summary>
    /// <param name="disposing">Whether or not the class is being explicitly or implicitly disposed</param>
    protected override void Dispose(bool disposing)
    {
        bool skippedDispose = false;

        try
        {
            if (!disposed)
            {
                if (disposing)
                {
                    ////////////////////////////////////
209
210
211
212
213
214
215

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230


231
232
233
234
235
236

237
238
239
240
241
242
243
                        }
                    }

                    if (reader != null)
                    {
                        reader._disposeCommand = true;
                        _activeReader = null;

                        return;
                    }

                    Connection = null;
                    _parameterCollection.Clear();
                    _commandText = null;
                }

                //////////////////////////////////////
                // release unmanaged resources here...
                //////////////////////////////////////
            }
        }
        finally
        {


            base.Dispose(disposing);

            //
            // NOTE: Everything should be fully disposed at this point.
            //
            disposed = true;

        }
    }
    #endregion

    ///////////////////////////////////////////////////////////////////////////////////////////////

    /// <summary>







>















>
>
|

|
|
|
|
>







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
                        }
                    }

                    if (reader != null)
                    {
                        reader._disposeCommand = true;
                        _activeReader = null;
                        skippedDispose = true;
                        return;
                    }

                    Connection = null;
                    _parameterCollection.Clear();
                    _commandText = null;
                }

                //////////////////////////////////////
                // release unmanaged resources here...
                //////////////////////////////////////
            }
        }
        finally
        {
            if (!skippedDispose)
            {
                base.Dispose(disposing);

                //
                // NOTE: Everything should be fully disposed at this point.
                //
                disposed = true;
            }
        }
    }
    #endregion

    ///////////////////////////////////////////////////////////////////////////////////////////////

    /// <summary>