Core Function BinaryWipe

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
Line 21: Line 21:
 
=== Remarks ===
 
=== Remarks ===
  
This will only wipe this individual variable it will not wipe every variable containing a referance to this binary data.
+
This will only wipe this individual variable it will not wipe every variable containing a reference to this binary data.
  
 
What this means is its quite possible you will free no memory from using this unless you also wipe all other binary variables using this data.
 
What this means is its quite possible you will free no memory from using this unless you also wipe all other binary variables using this data.
Line 34: Line 34:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
This is just as effective
+
This is just as effective.
  
 
<syntaxhighlight lang="sputnik">
 
<syntaxhighlight lang="sputnik">
Line 43: Line 43:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Also this is just as effective
+
Also, this is just as effective.
  
 
<syntaxhighlight lang="sputnik">
 
<syntaxhighlight lang="sputnik">

Revision as of 20:32, 4 December 2011

BinaryWipe( <binary-array> )

Contents

Description

Wipes a binary variables data 100% and sets the variable to a blank int containing just 0.

Parameters

binary-array

The binary variable to wipe.

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

This will only wipe this individual variable it will not wipe every variable containing a reference to this binary data.

What this means is its quite possible you will free no memory from using this unless you also wipe all other binary variables using this data.

Example

$binary = Pack("z0", "Hello World!\n" x 1000);
println( "Before Wipe: " . Unpack("z0", $binary) );
BinaryWipe($binary);
println( "After Wipe: " . $binary );

This is just as effective.

$binary = Pack("z0", "Hello World!\n" x 1000);
println( "Before Wipe: " . Unpack("z0", $binary) );
$binary = 0;
println( "After Wipe: " . $binary );

Also, this is just as effective.

$binary = Pack("z0", "Hello World!\n" x 1000);
println( "Before Wipe: " . Unpack("z0", $binary) );
unset($binary);
println( "After Wipe: " . $binary );
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox