Curve::Destroy

Description

Detach the Origin C Dataset object and Destroy (delete) the internal Origin data set.

Syntax

void Destroy( )

Parameters

Return

Examples

EX1

void Curve_Destroy_ex1()
{
    // Worksheet column Book1_A must exist prior to execution
    int ii;
    Curve    crv1;
    crv1.Create(3,1);           // Create data set with Size=3 & Option=1 (not a temporary data set)
    for(ii = 0; ii < 3; ii++)
        crv1[ii] = ii;
    LT_execute("list s;");     // Note new crv1 TEMP_ data set
    crv1.Destroy();             // Destroy crv1 TEMP_ data set
    LT_execute("list s;");     // Note new crv1 TEMP_ data set is destroyed

    Curve    crv2("Data1_A");    // Construct and attach to pre-existing Origin data set
    crv2.Destroy();             // Detaches crv2 from Data1_A but does not delete pre-existing data set from Origin
    LT_execute("list s;");     // Note crv2 is an Invalid Object but Data1_A still exists 
}

Remark

Delete (destroy) an Origin data set created using the Dataset::Create method. For data sets not created by the Dataset::Create method the Destroy method functions identically to the Dataset::Detach method.

See Also

Dataset::Detach, Dataset::Attach, Dataset::Create

header to Include

origin.h