home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / bit / listserv / iamiga / 10536 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.4 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!auvm!NOV.HB.SE!NDB120
  2. From: NDB120@NOV.HB.SE (Magnus Wissler... Amiga rules...)
  3. Newsgroups: bit.listserv.i-amiga
  4. Subject: Re: Gadgets & images
  5. Message-ID: <MAILQUEUE-101.930121175251.384@nov.hb.se>
  6. Date: 21 Jan 93 17:06:50 GMT
  7. Sender: Info-Amiga List <I-AMIGA@RUTVM1.BITNET>
  8. Lines: 20
  9. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  10. Priority: normal
  11. X-Mailer:     Pegasus Mail v2.3 (R5).
  12.  
  13. > From:          David McGhee <DMCGHEE1%UA1VM.BITNET@SEARN.SUNET.SE>
  14.  
  15. > Just a thought, If you aren't dynamically allocating the memory, your struct
  16. > may be getting filled with garbage when you return to the calling function.
  17. > The way to avoid this would be to declare the structure as static.
  18. >
  19. > just the pointer to it is in chip memory.
  20.  
  21. Yeah, right, I forgot that in my reply. It could be done with something like
  22.  
  23.   ptr = AllocMem( sizeof(struct Image)), MEMF_CHIP|MEMF_CLEAR);
  24.  
  25. Hope you get it working.
  26.  
  27.    +---------------------------------------------------------------------+
  28.    | These opinions are almost always my own ;-)                         |
  29.    |---------------------------------------------/-----------------------|
  30.    | Magnus Wissler @ Systems Architecture |  \/ Amiga                   |
  31.    | University College of Boras           |  InterNet: ndb120@nov.hb.se |
  32.    +---------------------------------------------------------------------+
  33.