473,372 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

operator delete(void *ptr, size_t size)

Hello all,

What is an example of a circumstance where it would be useful to overload
the form of operator delete with the second parameter (of type size_t)?

void operator delete(void *ptr, size_t size);

Jul 19 '05 #1
1 3830
"Dave" <be***********@yahoo.com> wrote in message
What is an example of a circumstance where it would be
useful to overload the form of operator delete with the
second parameter (of type size_t)?

void operator delete(void *ptr, size_t size);

If you were keeping lists of blocks ordered by size. This
could speed up finding the block to be deleted.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Marcin Vorbrodt | last post by:
Is there any reason why auto_ptr does not have the cast operator like this: operator void* (); So that one could easily test auto_ptr for NULL ??? Standard does not declare such operator. Is...
by: Jakob Bieling | last post by:
Hi, I remember reading a document that advised to prefer 'operator void*' over 'operator bool' or other way round, when I want to provide the ability to use code like this: test_class t;...
by: Sid | last post by:
Hi, I was going through this reference code and playing around with it. The code (shown below) shows a class that represents a stack of string pointers In the code below in particular in the...
by: | last post by:
My hear is dropping out of these linker errors of VC++ .NET. :-( I try to create a mixed managed/unmanaged .NET dll to be used for my futur projects, but I always bump in a linker error and no way...
by: qazmlp1209 | last post by:
My program cores at the 'delete ptr;' statement. I could think of the following possibilities for the core/undefined behaviour: - delete twice - new/malloc is done, but subsequently free/delete...
by: subramanian100in | last post by:
The following discussion is for learning purpose only. 1) Suppose for a type T, I have T *ptr = new T; To free ptr, suppose I use ( I deliberately omit in delete.) delete ptr;
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.