Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Documentation update about Buffer initialization
Browse files Browse the repository at this point in the history
fixes #7230

Reviewed-By: James M Snell <[email protected]>
PR-URL: #25565
  • Loading branch information
sarathms authored and jasnell committed Jun 26, 2015
1 parent e7f4237 commit 70efdf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/buffer.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

1 comment on commit 70efdf3

@trevnorris
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One reason why it's nice to word wrap is because any future changes to the text will have a smaller diff footprint.

Please sign in to comment.