|
From: Daniel G. <sp...@ho...> - 2003-07-15 18:57:35
|
I found another
(from memory) it was:
void* operator delete(_segment Seg, void* _based(void*) BasePtr, void*
Memory)
the variable names are my own, but I think the types are right. This is for
segments.
My problem needed a call to _ffree, but you cannot access the C runtime
library from another segment except the DEFAULT segment. So from your
segment you call your operator delete which calls your stub function (a
function in the DEFAULT segment) that then calls _ffree.
#include "SomeHeader.h" // Default seg header with MyDelete()
#pragma codeseg("MYSEG_SEG") // something like this
void operator delete (params here)
{
MyDelete(params); // Calls MyDelete which calls _ffree()
}
void SomeFunc()
{
// Create obj
delete obj;
}
>From: "Hossein Haeri" <ult...@em...>
>To: dev...@li...
>Subject: Re: [Dev-C++] overloading delete
>Date: Tue, 15 Jul 2003 13:15:09 -0500
>
>Dear Daniel,
>
> > What parameters does delete take? I'm being told by the compiler the
>first
> > is __segment and the second is a __based(void)* ?????
> > Is this right?
>
>If you only want the arguments, the following (the full signature) will
>convince you:
>
>void* operator delete(void*) throw();
>void* operator delete [] (void*) throw();
>
>I cite them directly from the Standard draft. But if you need more
>information take a look to Section 3.7.3.2 (Deallocation functions) in
>Standard. I don't have Accrobat Distiller. If I had I would send you
>the wholl chapter as a pdf file.
>
>You will also find good stuff in TC++PL:Spec. E.g., consider Section
>6.2.6.2, Section 15.6.1, and (the best at) Section 19.4.5.
>
>Regards,
>--Hossein
>
>
>--
>__________________________________________________________
>Sign-up for your own FREE Personalized E-mail at Mail.com
>http://www.mail.com/?sr=signup
>
>CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
>http://corp.mail.com/careers
>
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by: Parasoft
>Error proof Web apps, automate testing & more.
>Download & eval WebKing and get a free book.
>www.parasoft.com/bulletproofapps1
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile
|