Clean up comments; no more delete[].

This commit is contained in:
waterson%netscape.com 1999-08-29 19:38:41 +00:00
Родитель d23f6bff06
Коммит 27a6046e3c
3 изменённых файлов: 6 добавлений и 15 удалений

Просмотреть файл

@ -44,10 +44,7 @@
aFoo->GetFoo(&bar);
// Use bar here...
printf("bar is %s!\n", bar);
delete[] bar;
(Strictly speaking, the `delete[] bar' should use the proper XPCOM
de-allocator; we'll ignore that for now.)
nsAllocator::Free(bar);
This makes your life harder, because you need to convolute your code
to ensure that you don't leak `bar'.
@ -61,7 +58,7 @@
aFoo->GetFoo( getter_Copies(bar) );
// Use bar here...
printf("bar is %s!\n", (const char*) bar);
// no need to remember to delete[].
// no need to remember to nsAllocator::Free().
Like nsCOMPtr, nsXPIDLString uses some syntactic sugar to make it
painfully clear exactly what the code expects. You need to wrap an

Просмотреть файл

@ -44,10 +44,7 @@
aFoo->GetFoo(&bar);
// Use bar here...
printf("bar is %s!\n", bar);
delete[] bar;
(Strictly speaking, the `delete[] bar' should use the proper XPCOM
de-allocator; we'll ignore that for now.)
nsAllocator::Free(bar);
This makes your life harder, because you need to convolute your code
to ensure that you don't leak `bar'.
@ -61,7 +58,7 @@
aFoo->GetFoo( getter_Copies(bar) );
// Use bar here...
printf("bar is %s!\n", (const char*) bar);
// no need to remember to delete[].
// no need to remember to nsAllocator::Free().
Like nsCOMPtr, nsXPIDLString uses some syntactic sugar to make it
painfully clear exactly what the code expects. You need to wrap an

Просмотреть файл

@ -44,10 +44,7 @@
aFoo->GetFoo(&bar);
// Use bar here...
printf("bar is %s!\n", bar);
delete[] bar;
(Strictly speaking, the `delete[] bar' should use the proper XPCOM
de-allocator; we'll ignore that for now.)
nsAllocator::Free(bar);
This makes your life harder, because you need to convolute your code
to ensure that you don't leak `bar'.
@ -61,7 +58,7 @@
aFoo->GetFoo( getter_Copies(bar) );
// Use bar here...
printf("bar is %s!\n", (const char*) bar);
// no need to remember to delete[].
// no need to remember to nsAllocator::Free().
Like nsCOMPtr, nsXPIDLString uses some syntactic sugar to make it
painfully clear exactly what the code expects. You need to wrap an