|   | ![[ Previous ]](navbprev.gif)  ![[ Contents ]](navbhome.gif)  ![[ Index ]](navbhelp.gif)  ![[ Next ]](navbnext.gif)  | 
    Ns_Set *Ns_SetCopy(
    Ns_Set *old
    );
This function returns a newly allocated set that contains the same fields as the original set. The two sets share no memory and can be freed individually.
    Ns_Set *setA;
    Ns_Set *setB;
    
    setA = Ns_SetCreate("setA");
    Ns_SetPut(setA, "foo", "foovalue");
    setB = Ns_SetCopy(setA);
    Ns_SetFree(setA);
    /* do something with setB */
    Ns_SetFree(setB);