I am executing a program in PHP and getting the below error sometimes.Is this due to creating lot's of objects and not destroying them or any other reason?
Allowed memory size of 16777216 bytes exhausted (tried to allocate 19456 bytes) What is the correct method to destroy an object in PHP5.
Some code:
App::import('Vendor','GoogleShipping',array('file'=>'googlecheckout'.DS.'library'.DS.'googleshipping.php'));
App::import('Vendor','GoogleTax',array('file'=>'googlecheckout'.DS.'library'.DS.'googletax.php'));
class Cart{
var $_itemname;
var $_unit_price;
public function Usecase($itemname,$unit_price,$url,$merchant_private_item_data)
{
$cart = new GoogleCart($this->_merchant_id, $this->_merchant_key, $this->_server_type,$this->_currency);
$item_1 = new GoogleItem($this->_itemname,$this->_item_description,$this->_total_count,$this->_unit_price,$this->_merchant_private_item_data);
}
}