Re: Is BUF_MEM in BIO_s_mem automatically freed?

2014-07-19 Thread Iñaki Baz Castillo
2014-07-19 17:53 GMT+02:00 Matt Caswell : >> So, must I understand that, in case I don't set a custom buffer (this >> is, I do not call to BIO_set_mem_buf(), then the internal buffer of my >> BIO will be freed when I call free(my_bio)? >> > > You should not call free directly. Instead you should us

Re: Is BUF_MEM in BIO_s_mem automatically freed?

2014-07-19 Thread Matt Caswell
On 19/07/14 15:53, Iñaki Baz Castillo wrote: > Hi, > > The doc [*] says: > > "If the BIO_CLOSE flag is set when a memory BIO is freed then the > underlying BUF_MEM structure is also freed." > > The only place to set such a BIO_CLOSE flag is in the c argument

Re: Is BUF_MEM in BIO_s_mem automatically freed?

2014-07-19 Thread Dr. Stephen Henson
On Sat, Jul 19, 2014, Iaki Baz Castillo wrote: > Hi, > > The doc [*] says: > > "If the BIO_CLOSE flag is set when a memory BIO is freed then the > underlying BUF_MEM structure is also freed." > > The only place to set such a BIO_CLOSE flag is in the c argument

Is BUF_MEM in BIO_s_mem automatically freed?

2014-07-19 Thread Iñaki Baz Castillo
Hi, The doc [*] says: "If the BIO_CLOSE flag is set when a memory BIO is freed then the underlying BUF_MEM structure is also freed." The only place to set such a BIO_CLOSE flag is in the c argument in function: BIO_set_mem_buf(BIO *b,BUF_MEM *bm,int c) So, must I understand that,

Releasing memory, BUF_MEM*

2006-05-05 Thread Ola Flygare
Hello,   I have initialized a memory BIO to have certain content.   My question is: -“Do I have to release the BUF_MEM pointer bm?” -“Or is rbio using bm, thus loosing its data if I release the memory? And naturally, bm is destroyed upon destroying the rbio object.”   Thank you

BUF_MEM...

2001-07-24 Thread Antonio Ruiz Martínez
Hello! I've got a question about buf_mem The BIO_get_mem_ptr, Does it make a copy of the bytes in the byte array where is used? That is, Is there any function to free a BUF_MEM ? This is my source code BIO *bio=BIO_new(BIO_s_mem()); BUF_MEM *buf_mem=NULL; BIO_get_mem_pt