Remove unneeded array elements to save some memory
authorRoland Häder <roland@mxchange.org>
Sat, 19 May 2012 12:50:23 +0000 (12:50 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 19 May 2012 12:50:23 +0000 (12:50 +0000)
inc/classes/main/container/socket/class_SocketContainer.php

index 9a172d0..ff2b1a3 100644 (file)
@@ -44,6 +44,10 @@ class SocketContainer extends BaseContainer implements Registerable {
                // Get a new instance
                $containerInstance = new SocketContainer();
 
+               // Remove unneeded entries
+               unset($packageData[NetworkPackage::PACKAGE_DATA_CONTENT]);
+               unset($packageData[NetworkPackage::PACKAGE_DATA_SIGNATURE]);
+
                // Debug message
                /* NOISY-DEBUG: */ $containerInstance->debugOutput(__METHOD__ . ':socketResource=' . $socketResource . ',packageData='.print_r($packageData,true));