Search:

Type: Posts; User: CommonTater

Search: Search took 0.30 seconds.

  1. Replies
    5
    Views
    4,177

    When do we use free? Well... as soon as you are...

    When do we use free? Well... as soon as you are done with a dynamic variable.
    What do we free? Whatever we've created.

    For every malloc or calloc call you need a corresponding free.
  2. Replies
    5
    Views
    4,177

    Actually if you don't use malloc in your int* p...

    Actually if you don't use malloc in your int* p example, p is pointing to nothing, contains a garbage value and should not be used. As for treating it like an array such as p[10]... what if your...
Results 1 to 2 of 2