r4547: - added talloc_new(ctx) macro that is a neater form of the common talloc(ctx...
[samba.git] / source4 / lib / talloc / talloc_guide.txt
index ce3c8bde68fe7539fe43c83dc2cb68cdf16ef377..aa37c60466725ab02f300a65f240099f728f8868 100644 (file)
@@ -260,6 +260,15 @@ level context. It is equivalent to:
   talloc_named(NULL, 0, fmt, ...);
 
 
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+void *talloc_new(void *ctx);
+
+This is a utility macro that creates a new memory context hanging
+off an exiting context, automatically naming it "talloc_new: __location__"
+where __location__ is the source line it is called from. It is
+particularly useful for creating a new temporary working context.
+
+
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 void *talloc_realloc(const void *context, void *ptr, size_t size);