[windev] Memory allocation suggstion...
Serge Wautier
serge at wautier.net
Fri Aug 7 08:56:48 GMT 2009
Roberto,
malloc() was never deprecated. malloc() is the CRT (platform independent)
function to allocate memory in C. Each implementation of the malloc()
function in the C library uses whatever OS-specific API is required on the
targeted OS. In the case of Windows 16-bits, malloc() calls GlobalAlloc()
(which is the Win16-specific API to allocate memory), exactly as the C++ new
operator does (new also calls the object constructor).
Now, of course you can't go back in time but you asked for advice/opinions,
right? Here's mine: As much as possible, try to use standard
(platform-independent) libraries. The CRT (C) and the STL (C++) are such
libraries.
HTH,
Serge.
http://www.apptranslator.com
> -----Original Message-----
> From: Roberto Tirabassi [mailto:rtirabassi at 3di.it]
> Sent: vendredi 7 août 2009 10:44
> To: Serge Wautier
> Cc: 'Windows Developers (Mailing List)'
> Subject: Re: [windev] Memory allocation suggstion...
>
> Hi Serge,
> When I started programming in Windows, I mean in 1989 with Windows
> 16 bit, using malloc() was deprecated and GlobalAlloc() was to be used
> instead. I probably have to get back to the past... :o)
> Thanks...
>
> Roberto Tirabassi.
> --
> "Non è vero che un amico si vede nel momento del bisogno,
> un amico si vede sempre."
> [Roberto Benigni]
>
>
> Skype: roberto.tirabassi
>
> 3D Informatica, Via Speranza 35,
> 40068, S.Lazzaro di Savena - Bologna, Italy
> Voice: +39051450844, Fax: +39051451942
> WWW: https://www.3di.it
> Documentation: https://www.3di.it/manuali/ - http://wiki.3di.it
> FTP: ftp://ftp@ftp.3di.it, Download:/3di, Upload:/incoming
> --
>
>
More information about the Windev
mailing list