Automattic\WooCommerce\DataBase\Migrations\CustomOrderTable

CLIRunner::free_in_memory_usage()privateWC 1.0

Free some in-memory usage.

Method of the class: CLIRunner{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->free_in_memory_usage();

CLIRunner::free_in_memory_usage() code WC 9.0.1

private function free_in_memory_usage() {
	$GLOBALS['wpdb']->flush();
	$GLOBALS['wpdb']->queries = array(); // Query log.

	if ( function_exists( 'wp_cache_supports' ) && wp_cache_supports( 'flush_runtime' ) ) {
		wp_cache_flush_runtime();
	}
}