mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.6 KiB
42 lines
1.6 KiB
--- !ditz.rubyforge.org,2008-03-06/issue
|
|
title: add finalizer support for plain buffers
|
|
desc: |-
|
|
Buffers very often need finalizer support because they can contain native
|
|
structures pointing to malloc()'d memory (or socket handles, etc). Currently
|
|
user code must use an actual object and attach a finalizer for that object.
|
|
|
|
Adding a fixed finalizer field would add buffer overhead for those buffers
|
|
that don't need finalization which is not ideal (but certainly a reasonable
|
|
approach anyway).
|
|
|
|
Another approach would be to support finalizers only for dynamic buffers: add
|
|
a flag for "finalizer present" and if the flag is set, store a finalizer
|
|
pointer in the dynamic data area (before or after actual data).
|
|
|
|
A third approach would be to similarly use dynamic buffers but put the pointer
|
|
in the duk_hbuffer_dynamic struct (depending on whether or not a finalizer is
|
|
needed). However, this would require user to know beforehand when a finalizer
|
|
is needed because it affects the duk_hbuffer alloc size.
|
|
type: :feature
|
|
component: duk
|
|
release: v1.2
|
|
reporter: Sami Vaarala <sami.vaarala@iki.fi>
|
|
status: :unstarted
|
|
disposition:
|
|
creation_time: 2014-10-06 08:59:55.754356 Z
|
|
references: []
|
|
|
|
id: 39f8f5bfd85083fe4e3af1bea400cff87127f459
|
|
log_events:
|
|
- - 2014-10-06 08:59:56.282297 Z
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
- created
|
|
- ""
|
|
- - 2014-11-02 00:17:28.958157 Z
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
- assigned to release v2.0 from v1.1
|
|
- ""
|
|
- - 2014-11-02 00:17:56.839095 Z
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
- assigned to release v1.2 from v2.0
|
|
- ""
|
|
|