forked from svaarala/duktape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathissue-39f8f5bfd85083fe4e3af1bea400cff87127f459.yaml
42 lines (38 loc) · 1.57 KB
/
issue-39f8f5bfd85083fe4e3af1bea400cff87127f459.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- !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 <[email protected]>
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 <[email protected]>
- created
- ""
- - 2014-11-02 00:17:28.958157 Z
- Sami Vaarala <[email protected]>
- assigned to release v2.0 from v1.1
- ""
- - 2014-11-02 00:17:56.839095 Z
- Sami Vaarala <[email protected]>
- assigned to release v1.2 from v2.0
- ""