The unset () function of PHP is used to clear and destroy variables. unused variables can be destroyed using unset. However, in some cases, the memory occupied by destroying variables cannot be reached with unset!
The code is as follows:
For ($ I =
The unset () function of PHP is used to clear and destroy variables. unused variables can be destroyed using unset. However, in some cases, the memory occupied by destroying variables cannot be reached with unset!
Copy codeThe code is as
The purpose of the destroy is for memory leaks, which can have an impact on performance.Angular scope triggers destroy when dealing with element removal, and the invocation logic is used as jquery.There is one thing you can refer to in CK Editor.CK
Reprinted from: http://www.okajax.com/a/201106/php_unset.html
The unset () function of PHP is used to clear and destroy variables. unused variables can be destroyed using unset. However, in some cases, the memory occupied by destroying variables
Copy codeThe Code is as follows:For ($ I = 1; I I $ Str = str_repeat ('20140901', $ I );$ A = memory_get_usage ();Unset ($ str );$ B = memory_get_usage ();Echo "\ n". $ I. ':'. ($ B-$ a). 'bytes .';} The result shows that:8x32 = 256 it is really
Let's first look at an example: The code is as follows:Copy code $ S = str_repeat ('1', 255); // generates a string consisting of 255 1$ M = memory_get_usage (); // Get the memory occupied currentlyUnset ($ s );$ Mm = memory_get_usage (); //
I have seen an introduction to the memory pool technology, which has benefited a lot.
Original post address: http://www.ibm.com/developerworks/cn/linux/l-cn-ppp/index6.html
6.1 Principle of Performance Optimization for custom memory pools
As
See an article about the memory pool technology introduction article, benefited, posted here.Original Sticker Address: http://www.ibm.com/developerworks/cn/linux/l-cn-ppp/index6.html 6.1 The principle of custom memory pool performance optimizationAs
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.