From 0a15f534172538b9235c48e06a297f6e9365ba48 Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Thu, 4 Jul 2024 20:02:19 +0300 Subject: [PATCH] remove unnecessary destroy method --- README.md | 1 - index.js | 5 ----- 2 files changed, 6 deletions(-) diff --git a/README.md b/README.md index 7f78ffc..c5c2f84 100644 --- a/README.md +++ b/README.md @@ -269,7 +269,6 @@ Misc methods: * `realloc(minBytes)` - pad the underlying buffer size to accommodate the given number of bytes; note that the size increases exponentially, so it won't necessarily equal the size of data written * `finish()` - make the current buffer ready for reading and return the data as a buffer slice -* `destroy()` - dispose the buffer For an example of a real-world usage of the library, see [vector-tile-js](https://github.com/mapbox/vector-tile-js). diff --git a/index.js b/index.js index f610634..e289fd0 100644 --- a/index.js +++ b/index.js @@ -21,11 +21,6 @@ export default class Pbf { this.length = this.buf.length; } - destroy() { - this.buf = null; - this.dataView = null; - } - // === READING ================================================================= readFields(readField, result, end = this.length) {