*** empty log message ***
[libidn.git] / lib / idn-free.h
blob0a0fdbff28637eca32e6f6d70e9c8951c080c221
1 /* idn-free.h --- Invoke the `free' function releasing memory
2 * allocated by libidn functions.
3 * Copyright (C) 2004 Simon Josefsson
5 * This file is part of GNU Libidn.
7 * GNU Libidn is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * GNU Libidn is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with GNU Libidn; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 /* I don't recommend using this interface in general. Use `free'.
25 * I'm told Microsoft Windows may use one set of `malloc' and `free'
26 * in a library, and another incompatible set in a statically compiled
27 * application that link to the library, thus creating problems if the
28 * application would invoke `free' on a pointer pointing to memory
29 * allocated by the library. This motivated adding this function.
31 * The theory of isolating all memory allocations and de-allocations
32 * within a code package (library) sounds good, to simplify hunting
33 * down memory allocation related problems, but I'm not sure if it is
34 * worth enough to motivate recommending this interface over calling
35 * `free' directly, though.
37 * If you have any thoughts or comments on this, please let me know.
40 void idn_free (void *ptr);