Skip to content

Commit 025e560

Browse files
committed
try more aggressive dropping
1 parent ac63df0 commit 025e560

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/DB_Command_SQLite.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ protected function sqlite_drop() {
153153
if ( $wpdb instanceof \wpdb ) {
154154
$wpdb->close();
155155
}
156+
unset( $wpdb );
157+
gc_collect_cycles();
156158

157159
if ( ! unlink( $db_path ) ) {
158160
WP_CLI::error( "Could not delete database file: {$db_path}" );
@@ -177,6 +179,8 @@ protected function sqlite_reset() {
177179
if ( $wpdb instanceof \wpdb ) {
178180
$wpdb->close();
179181
}
182+
unset( $wpdb );
183+
gc_collect_cycles();
180184

181185
if ( ! unlink( $db_path ) ) {
182186
WP_CLI::error( "Could not delete database file: {$db_path}" );

0 commit comments

Comments
 (0)