OpenersNotesSection(Spacer1)Details

MLReleaseByteString() is declared in the MathLink header file (RefLink[mathlink.h, paclet:ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "mathlink.h"

/* read a string composed of character code values 0-255 from the link and release that memory to MathLink for deallocation */

void f(MLINK lp)
{
	const unsigned char *string;
	int length;

	if(! MLGetByteString(lp, &string, &length, 0))
		{ /* unable to read byte string from lp */ }

	/* ... */

	MLReleaseByteString(lp, string, length);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLGetByteString(), paclet:ref/c/MLGetByteString])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Manipulating Expressions in External Programs, paclet:tutorial/ManipulatingExpressionsInExternalPrograms])}, {▪(RefLinkPlain[Handling Lists, Arrays and Other Expressions, paclet:tutorial/HandlingListsArraysAndOtherExpressions])}})}})