On Tuesday, 14 September 2021 at 16:07:00 UTC, jfondren wrote:
No. And when was the first one?

here:

On Monday, 13 September 2021 at 18:45:22 UTC, jfondren wrote:
 auto p = cast(EpollEvent*) pureMalloc(EpollEvent.sizeof);

What? Allocate struct epoll_event on the heap?
It is a feeble joke ;)

```c
    static int ecap__add(int fd, void *dptr)
    {
        struct epoll_event waitfor = {0};
           int flags, r;

        waitfor.data.ptr = dptr;

        r = epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &waitfor);
        if (-1 == r) {
```

All fd's (sockets, timers etc) are added the same way
and corresponding EventSources are not destroyed by GC.

Reply via email to