home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / amiga / programm / 18359 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.9 KB  |  53 lines

  1. Path: sparky!uunet!mcsun!news.funet.fi!funic!sauna.cs.hut.fi!news.cs.hut.fi!s37732v
  2. From: s37732v@snakemail.hut.fi (Markus Juhani Aalto)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Please help with stupid memory leak
  5. Date: 08 Jan 93 16:14:28 GMT
  6. Organization: Helsinki University of Technology, Finland
  7. Lines: 39
  8. Distribution: inet
  9. Message-ID: <S37732V.93Jan8181428@lk-hp-20.hut.fi>
  10. References: <C0ICKI.H57@usenet.ucs.indiana.edu>
  11. NNTP-Posting-Host: lk-hp-20.hut.fi
  12. In-reply-to: shulick@navajo.ucs.indiana.edu's message of 7 Jan 93 23:43:26 GMT
  13.  
  14. In article <C0ICKI.H57@usenet.ucs.indiana.edu> shulick@navajo.ucs.indiana.edu (Sam Hulick) writes:
  15.  
  16.    I can't figure this one out.  It seems to not free either 56 bytes or
  17.    296.  Anyway, the usage is:  req <title> <text> <choice1> [choice]...
  18.    Some examples:
  19.      req Problem "There's a bug in here." "Kill it" "Hang it" Cancel
  20.  
  21.    Well, it doesn't free up memory, but I can't figure out WHAT.. any help
  22.    would be appreciated.
  23.  
  24. [ Lot of deleted here ...]
  25.  
  26.    void main(int ac, char **av)
  27.    {
  28.       int x, len;
  29.       char workstr[BUFSIZ];
  30.  
  31.       memset(arr, '\0', sizeof(arr));
  32.       /* Oh, ReadArgs() is so nice.. :) */
  33.       if (!(rd = ReadArgs("Title/A,Text/A,Choice1/A,Choices/F", arr, NULL)))
  34.       {
  35.      fprintf(stderr, "required argument missing\n");
  36.      bye();
  37.       }
  38.  
  39.  
  40. You should use FreeArgs(rd) to free memory allocated by ReadArgs().
  41.  
  42. --
  43.  
  44.  
  45. **************************************************************************
  46. *         Markus Aalto              | Helsinki University of Technology  *
  47. *                                   |                                    *
  48. *  EMail: s37732v@vipunen.hut.fi    | Faculty of Electric Engineering    *
  49. *  Fax:   358-0-8746991 (Sometimes) |                                    *
  50. *                                   | Undergraduate in Computer Science  *
  51. **************************************************************************
  52.         
  53.