MS DOS overlay programming

Richard legalize at xmission.com
Thu Dec 28 19:25:05 CST 2006


In article <d67e42a90612281640h7a71e83dh796a428725a63127 at mail.gmail.com>,
    "Eric J Korpela" <korpela at ssl.berkeley.edu>  writes:

> void initialization_routine() {
>   init_var *tmpvars=new(init_vars);
>   // do initialization stuff
>   // add noops here if necessary to pad the routine to sizeof(init_vars)
>   *init=*tmpvars;
>   delete tmpvars;
> }

Classic case of abusing new/delete when all you need to do is declare
an instance of init_vars on the stack...
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
      <http://www.xmission.com/~legalize/book/download/index.html>

        Legalize Adulthood! <http://blogs.xmission.com/legalize/>



More information about the cctech mailing list