From 7e25366af96bc94972764b6d46c4ba6bccce8a79 Mon Sep 17 00:00:00 2001 From: php-curl-class Date: Mon, 19 Aug 2013 17:52:14 -0700 Subject: [PATCH] Add destructor --- Curl.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Curl.class.php b/Curl.class.php index 315533b..d3caa0f 100644 --- a/Curl.class.php +++ b/Curl.class.php @@ -80,6 +80,10 @@ class Curl { return $this->error_code; } + function __destruct() { + $this->close(); + } + private $_cookies = array(); public $curl;