C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
free() Posted by Gregry2 on 30 Sept 2005 at 9:58 PM
This message was edited by Gregry2 at 2005-9-30 22:10:19

This message was edited by Gregry2 at 2005-9-30 22:7:28

is there any way to free only a part of a buffer that is dynamic?

would this work?...it seems stupid...

free(buff[i]), and it'll start from i*sizeof(buff) to the end?
erg, that makes no sense though...

Or we just free every single block, one at a time?

i dont wanna have to segment my block...too much work.

thanx

by the way...for a intranet chatting program, which is better, connectionless sockets, or stream sockets?...

honto no kimochi kitsukanai furishite
totsuzen futari koi ni ochitano...

{2}rIng, its one of my favorite songs....


Report
Re: free() Posted by AsmGuru62 on 1 Oct 2005 at 4:15 AM
Use realloc() to decrease block size.
Report
Re: free() Posted by Gregry2 on 1 Oct 2005 at 4:23 AM
: Use realloc() to decrease block size.
:
grr, i forgot about reading about that, thanx anyway

and about the connectless or not, do you know?

thanx
{2}rIng
Report
Re: free() Posted by stober on 1 Oct 2005 at 4:23 AM
:
: by the way...for a intranet chatting program, which is better, connectionless sockets, or stream sockets?...
:

There is no guarentee that UDP packet will ever get to their destination, and the further away from the source computer the more likely that will happen.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.