RE: enif_send, terms and msg_env
Sverker Eriksson <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <AM7PR07MB69007CCE87D4909153FB3B92FD3E0@AM7PR07MB6900.eurprd07.prod.outlook.com> |
>> The message environment msg_env with all its terms (including msg) is >> invalidated by a successful call to enif_send. > > I have created msg in another environment and I do not want to invalidate > it. > > Should I just prefer using NULL for msg_env in this case? > Yes. With msg_env==NULL the message will be copied to the receiver. With msg_env!=NULL the message will be handed over to the receiver together will any other terms in msg_env which will become garbage. /Sverker Erlang/OTP
smime.p7s
(application/pkcs7-signature, 5.4 KB) - not displayed