humble-video-noarch/src/main/java/io/humble/ferry/JNIMemoryParachute.java
boolean packChute() throws OutOfMemoryError
  {
    if (mPayload != null)
      return true;
    
    // otherwise the payload is null
    synchronized(this)
    {
      if (mPayload != null)
        return true;
      try {
        //System.out.println("Packing the parachute! this=" + this);
        mPayload = new byte[PAYLOAD_BYTES];
        mPayload[0] = 'P';
        mPayload[1] = 'A';
        mPayload[2] = 'R';
        mPayload[3] = 'A';
        mPayload[4] = 'C';
        mPayload[5] = 'H';
        mPayload[6] = 'U';
        mPayload[7] = 'T';
        mPayload[8] = 'E';
        mPayload[9] = '!';
        return true;
      } catch (OutOfMemoryError e) {
        // we failed to create the parachute.  Also known as bad.
        // forward it on.
        throw e;
      }
    }
  }
boolean packChute() throws OutOfMemoryError
  {
    if (mPayload != null)
      return true;
    
    // otherwise the payload is null
    synchronized(this)
    {
      if (mPayload != null)
        return true;
      try {
        //System.out.println("Packing the parachute! this=" + this);
        mPayload = new byte[PAYLOAD_BYTES];
        mPayload[0] = 'P';
        mPayload[1] = 'A';
        mPayload[2] = 'R';
        mPayload[3] = 'A';
        mPayload[4] = 'C';
        mPayload[5] = 'H';
        mPayload[6] = 'U';
        mPayload[7] = 'T';
        mPayload[8] = 'E';
        mPayload[9] = '!';
        return true;
      } catch (OutOfMemoryError e) {
        // we failed to create the parachute.  Also known as bad.
        // forward it on.
        throw e;
      }
    }
  }
boolean packChute ( ) throws OutOfMemoryError { if ( mPayload != null ) return true ; // otherwise the payload is null synchronized ( this ) { if ( mPayload != null ) return true ; try { //System.out.println("Packing the parachute! this=" + this); mPayload = new byte [ PAYLOAD_BYTES ] ; mPayload [ 0 ] = ' ' ; mPayload [ 1 ] = ' ' ; mPayload [ 2 ] = ' ' ; mPayload [ 3 ] = ' ' ; mPayload [ 4 ] = ' ' ; mPayload [ 5 ] = ' ' ; mPayload [ 6 ] = ' ' ; mPayload [ 7 ] = ' ' ; mPayload [ 8 ] = ' ' ; mPayload [ 9 ] = ' ' ; return true ; } catch ( OutOfMemoryError e ) { // we failed to create the parachute.  Also known as bad. // forward it on. throw e ; } } }
Checks the current parachute and recreates (reloads) our payload
if needed.
@return true on success pretty much all the time because...
@throws OutOfMemoryError if we can't reload the parachute
Checks the current parachute and recreates ( reloads ) our payload if needed .