isDisposed - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Algebraic.isDisposed

checks to see if the Algebraic object has been disposed

 

Calling Sequence

Description

Examples

Calling Sequence

boolean isDisposed() throws MapleException

Description

• 

The isDisposed function returns true if the current Algebraic object had its dispose method called, otherwise it returns false.

• 

If the isDisposed function returns true, it is an error to attempt to call any member function of the Algebraic object except for isDisposed.

Examples

import com.maplesoft.openmaple.*;

import com.maplesoft.externalcall.MapleException;

class Example

{

    public static void main( String notused[] ) throws MapleException

    {

        String[] mapleArgs = { "java" };

        Engine engine = new Engine( mapleArgs, new EngineCallBacksDefault(), null, null );

        Algebraic a1 = engine.evaluate( "Array( 1..10^6 ):" );

        if ( a1.isDisposed() )

        {

            System.out.println( "Disposed" );

        }

        else

        {

            System.out.println( "Not Disposed" );

        }

        a1.dispose();

        if ( a1.isDisposed() )

        {

            System.out.println( "Disposed" );

        }

        else

        {

            System.out.println( "Not Disposed" );

        }

    }

}

Executing this code should produce the following output.

Not Disposed

Disposed

See Also

ExternalCalling/Java/MapleException

OpenMaple

OpenMaple/Java/Algebraic

OpenMaple/Java/Algebraic/dispose

OpenMaple/Java/API

OpenMaple/Java/Engine/evaluate

OpenMaple/Java/memory

 


Download Help Document