C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 30th, 2002, 01:37 AM
GeneralDisorder GeneralDisorder is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 0 GeneralDisorder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Overloading Global Vector new and delete

I'm working on a debuging system, and would like the ability to detect when a programmer uses the incorrect form of delete (delete where they should have used delete[] ). Preferably at compile time, but run time may be sufficient as well. The problem I have run into is that Visual C++ will not allow me to overload new[] and delete[] in a global scope (it compiles, but I get a redefinition error - it seems to conflict with my overloaded versions of non-vector new and delete). If I am unable to overload the vector form, then there is no way to tell when an allocation is an array, and therefore no way for me to determine if the correct version of delete has been called. Any assistance someone could offer would be appreciated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Overloading Global Vector new and delete


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway