> On Oct 18, 2018, at 13:04, Daniel Krikun <[email protected]> wrote:
>
> Suppose we have an file read request:
>
> // somewhere at a function scope
> uv_buf_t buf =uv_buf_init(buffer, size);
> uv_fs_t req;
> uv_fs_read(uv_default_loop(), &req, file, &buf,1, offset, read_cb);
>
> Is it correct to allocate `req` on stack like above, or it has to survive
> until `read_cb` is actually called?
>
It needs to survive until read_cb is called.
Cheers,
>
> --
> You received this message because you are subscribed to the Google Groups
> "libuv" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/libuv.
> For more options, visit https://groups.google.com/d/optout.
--
Saúl
--
You received this message because you are subscribed to the Google Groups
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.