From cf13a281b8338908d1fc6c3accc93a5a02433abd Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Tue, 22 Dec 1998 19:01:14 +0000 Subject: [PATCH] Added comment to strdup() noting that t he caller must use delete[] to free the memory git-svn-id: svn://10.0.0.236/trunk@16814 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/base/src/nsCRT.h | 2 ++ mozilla/xpcom/ds/nsCRT.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mozilla/base/src/nsCRT.h b/mozilla/base/src/nsCRT.h index 88c24886783..bbd2a9bbc86 100644 --- a/mozilla/base/src/nsCRT.h +++ b/mozilla/base/src/nsCRT.h @@ -102,6 +102,8 @@ public: static PRInt32 strncasecmp(const PRUnichar* s1, const char* s2, PRInt32 aMaxLen); + // Note: uses new[] to allocate memory, so you must use delete[] to + // free the memory static PRUnichar* strdup(const PRUnichar* str); /// Compute a hashcode for a ucs2 string diff --git a/mozilla/xpcom/ds/nsCRT.h b/mozilla/xpcom/ds/nsCRT.h index 88c24886783..bbd2a9bbc86 100644 --- a/mozilla/xpcom/ds/nsCRT.h +++ b/mozilla/xpcom/ds/nsCRT.h @@ -102,6 +102,8 @@ public: static PRInt32 strncasecmp(const PRUnichar* s1, const char* s2, PRInt32 aMaxLen); + // Note: uses new[] to allocate memory, so you must use delete[] to + // free the memory static PRUnichar* strdup(const PRUnichar* str); /// Compute a hashcode for a ucs2 string