Results 1 to 6 of 6

Thread: [RESOLVED] C: Not sure about use of free()

Threaded View

  1. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: C: Not sure about use of free()

    Quote Originally Posted by chemicalNova
    Free assigns the pointer NULL automatically...
    chem
    Remind me never to run any of your apps ...

    free() accepts a void pointer, which is basically copied onto the stack when the call is made, therefore it is not possible for free() to set the original pointer to null. It would have to be a pointer to the pointer if that were the case.

    Therefore...
    Attached Images Attached Images  
    Last edited by wossname; Mar 18th, 2008 at 07:29 AM.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width