Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unneeded destruct methods as GC has higher performance #6631

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions app/access_controls/resources/classes/access_controls.php
Expand Up @@ -30,16 +30,6 @@ public function __construct() {

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete records
*/
Expand Down
Expand Up @@ -44,16 +44,6 @@ public function __construct() {
}
}

/**
* Called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* Get the call activity
*/
Expand Down
10 changes: 0 additions & 10 deletions app/bridges/resources/classes/bridges.php
Expand Up @@ -57,16 +57,6 @@ public function __construct() {

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete records
*/
Expand Down
10 changes: 0 additions & 10 deletions app/call_block/resources/classes/call_block.php
Expand Up @@ -45,16 +45,6 @@ public function __construct() {

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete records
*/
Expand Down
10 changes: 0 additions & 10 deletions app/call_broadcast/resources/classes/call_broadcast.php
Expand Up @@ -33,16 +33,6 @@ public function __construct() {

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete records
*/
Expand Down
10 changes: 0 additions & 10 deletions app/call_centers/resources/classes/call_center.php
Expand Up @@ -62,16 +62,6 @@ public function __construct() {
$this->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
}

/**
* Called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* Add a dialplan for call center
* @var string $domain_uuid the multi-tenant id
Expand Down
10 changes: 0 additions & 10 deletions app/call_flows/resources/classes/call_flows.php
Expand Up @@ -60,16 +60,6 @@ public function __construct() {

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete records
*/
Expand Down
10 changes: 0 additions & 10 deletions app/call_recordings/resources/classes/call_recordings.php
Expand Up @@ -33,16 +33,6 @@ public function __construct() {
$this->location = 'call_recordings.php';
}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete rows from the database
*/
Expand Down
10 changes: 0 additions & 10 deletions app/conference_centers/resources/classes/conference_centers.php
Expand Up @@ -68,16 +68,6 @@ public function __construct() {

}

/**
* Called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* count the conference rooms
*/
Expand Down
10 changes: 0 additions & 10 deletions app/conference_controls/resources/classes/conference_controls.php
Expand Up @@ -60,16 +60,6 @@ public function __construct() {
$this->app_uuid = 'e1ad84a2-79e1-450c-a5b1-7507a043e048';
}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete rows from the database
*/
Expand Down
10 changes: 0 additions & 10 deletions app/conference_profiles/resources/classes/conference_profiles.php
Expand Up @@ -60,16 +60,6 @@ public function __construct() {
$this->app_uuid = 'c33e2c2a-847f-44c1-8c0d-310df5d65ba9';
}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete rows from the database
*/
Expand Down
11 changes: 0 additions & 11 deletions app/conferences/resources/classes/conferences.php
Expand Up @@ -56,17 +56,6 @@ public function __construct() {
$this->toggle_values = ['true','false'];

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete records
*/
Expand Down
10 changes: 0 additions & 10 deletions app/contacts/resources/classes/contacts.php
Expand Up @@ -69,16 +69,6 @@ public function __construct() {

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete records
*/
Expand Down
10 changes: 0 additions & 10 deletions app/destinations/resources/classes/destinations.php
Expand Up @@ -68,16 +68,6 @@ public function __construct() {
$this->uuid_prefix = 'destination_';
}

/**
* Called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* Convert destination number to a regular expression
* @var string $array destination_prefix, destination_trunk_prefix, destination_area_code, destination_number
Expand Down
6 changes: 0 additions & 6 deletions app/devices/resources/classes/device.php
Expand Up @@ -53,12 +53,6 @@ public function __construct() {

}

public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

public function get_domain_uuid() {
return $this->domain_uuid;
}
Expand Down
10 changes: 0 additions & 10 deletions app/email_logs/resources/classes/email_logs.php
Expand Up @@ -53,16 +53,6 @@ public function __construct() {

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete records
*/
Expand Down
10 changes: 0 additions & 10 deletions app/email_queue/resources/classes/email_queue.php
Expand Up @@ -35,16 +35,6 @@ public function __construct() {
$this->location = 'email_queue.php';
}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete rows from the database
*/
Expand Down
10 changes: 0 additions & 10 deletions app/email_templates/resources/classes/email_templates.php
Expand Up @@ -57,16 +57,6 @@ public function __construct() {

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete records
*/
Expand Down
10 changes: 0 additions & 10 deletions app/event_guard/resources/classes/event_guard.php
Expand Up @@ -59,16 +59,6 @@ public function __construct() {
$this->location = 'event_guard_logs.php';
}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete rows from the database
*/
Expand Down
10 changes: 0 additions & 10 deletions app/extension_settings/resources/classes/extension_settings.php
Expand Up @@ -61,16 +61,6 @@ public function __construct() {
$this->location = 'extension_settings.php';
}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete rows from the database
*/
Expand Down
10 changes: 0 additions & 10 deletions app/extensions/resources/classes/extension.php
Expand Up @@ -103,16 +103,6 @@ public function __construct() {

}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

public function exists($domain_uuid, $extension) {
$sql = "select count(*) from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
Expand Down
10 changes: 0 additions & 10 deletions app/fax/resources/classes/fax.php
Expand Up @@ -65,16 +65,6 @@ public function __construct() {

}

/**
* Called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* Add a dialplan for call center
* @var string $domain_uuid the multi-tenant id
Expand Down
10 changes: 0 additions & 10 deletions app/fax_queue/resources/classes/fax_queue.php
Expand Up @@ -59,16 +59,6 @@ public function __construct() {
$this->location = 'fax_queue.php';
}

/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}

/**
* delete rows from the database
*/
Expand Down