Files
Nim/tests/arc
ringabout 2af602a5c8 deprecate NewFinalize with the ref T finalizer (#24354)
pre-existing issues:

```nim
block:
  type
    FooObj = object
      data: int
    Foo = ref ref FooObj


  proc delete(self: Foo) =
    echo self.data

  var s: Foo
  new(s, delete)
```
it crashed with arc/orc in 1.6.x and 2.x.x

```nim
block:
  type
    Foo = ref int


  proc delete(self: Foo) =
    echo self[]

  var s: Foo
  new(s, delete)
```

The simple fix is to add a type restriction for the type `T` for arc/orc
versions
```nim
  proc new*[T: object](a: var ref T, finalizer: proc (x: T) {.nimcall.})
```
2024-10-25 22:35:26 +02:00
..
2023-07-06 15:15:50 +02:00
2021-10-29 19:55:48 +02:00
2022-10-02 06:44:10 +02:00
2023-06-30 14:54:46 +02:00
2023-06-02 16:03:32 +02:00
2022-10-17 23:48:51 +02:00
2021-07-13 12:44:29 +02:00
2021-07-27 09:36:19 +02:00
2023-06-27 22:42:48 +02:00
2022-10-01 16:46:51 +02:00
2021-06-25 14:12:23 +02:00
2021-07-13 14:17:59 +02:00
2021-07-27 14:32:56 +02:00