Documentation update about Buffer initialization

fixes #7230

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
This commit is contained in:
Sarath authored and James M Snell committed 2015-08-03 20:44:39 -07:00
1 parent b7229debbe
commit 53b6a615a5
1 file changed
+1 -1
+1 -1
View File
@@ -64,7 +64,7 @@ It can be constructed in a variety of ways.
Allocates a new buffer of `size` octets. Note, `size` must be no more than
[kMaxLength](smalloc.html#smalloc_smalloc_kmaxlength). Otherwise, a `RangeError`
will be thrown here.
will be thrown here. Unlike `ArrayBuffers`, the underlying memory for buffers is not initialized. So the contents of a newly created `Buffer` is unknown. Use `buf.fill(0)`to initialize a buffer to zeroes.
### new Buffer(array)