Warning: Cannot modify header information - headers already sent by (output started at /home/yusuf/public_html/yusufaytas.com/wp-content/themes/beveled/includes/widgets/widget-woo-tabs.php:1) in /home/yusuf/public_html/yusufaytas.com/wp-includes/feed-rss2-comments.php on line 8 Comments on: Use of Pointers for implementing list of elements
http://www.yusufaytas.com/use-of-pointers-for-implementing-list-of-elements/
Yazılım ÇözümleriMon, 30 Jan 2012 11:34:41 +0000hourly1http://wordpress.org/?v=3.3.1By: Yusuf Aytaş
http://www.yusufaytas.com/use-of-pointers-for-implementing-list-of-elements/comment-page-1/#comment-36
Yusuf AytaşMon, 03 Nov 2008 19:34:10 +0000http://www.yusufaytas.com/?p=211#comment-36Thank you very much for your attention. The first delete [] ptr is to delete array elements. The second one is not necessarry and we delete ptr. Yout are right about "size" and "allocated_size". However, I wanted to show people the use of pointers and I did not care efficiency. It will be more beneficial if we use chunks.
Thank you very much...Thank you very much for your attention. The first delete [] ptr is to delete array elements. The second one is not necessarry and we delete ptr. Yout are right about “size” and “allocated_size”. However, I wanted to show people the use of pointers and I did not care efficiency. It will be more beneficial if we use chunks.
Thank you very much…
]]>By: bk
http://www.yusufaytas.com/use-of-pointers-for-implementing-list-of-elements/comment-page-1/#comment-35
bkMon, 03 Nov 2008 19:13:14 +0000http://www.yusufaytas.com/?p=211#comment-35Are you sure the "delete[], delete" thing is not wrong? Something tells me this is a double delete on the same pointer. Also, this class could benefit if you allocated memory in chunks (have a "size" member and "allocated_size", allocate e.g. 1024 bytes more when when "size" >= "allocated_size" and vice versa when freeing memory).Are you sure the “delete[], delete” thing is not wrong? Something tells me this is a double delete on the same pointer. Also, this class could benefit if you allocated memory in chunks (have a “size” member and “allocated_size”, allocate e.g. 1024 bytes more when when “size” >= “allocated_size” and vice versa when freeing memory).
]]>