# DestroySessionVariableByIdAsync Method

## Overloads

| [DestroySessionVariableByIdAsync(String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableByIdAsync.htm#Qlik_Engine_App_DestroySessionVariableByIdAsync_System_String_) |  | Removes a transient variable. |
| --- | --- | --- |
| [DestroySessionVariableByIdAsync(AsyncHandle, String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableByIdAsync.htm#Qlik_Engine_App_DestroySessionVariableByIdAsync_Qlik_Engine_AsyncHandle_System_String_) |  | Removes a transient variable. |
| [DestroySessionVariableByIdAsync<T>(AsyncHandle, Func<Response, T>, String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableByIdAsync.htm#Qlik_Engine_App_DestroySessionVariableByIdAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_) |  | Removes a transient variable. |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableByIdAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableByIdAsync.htm)

## DestroySessionVariableByIdAsync(String)

Removes a transient variable.

### Declaration

```

          public Task<bool> DestroySessionVariableByIdAsync([QixName("qId")] string id)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | id | Identifier of the variable. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Boolean&gt; |  |

### Implements

[IApp.DestroySessionVariableByIdAsync(String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.DestroySessionVariableByIdAsync.htm#Qlik_Engine_IApp_DestroySessionVariableByIdAsync_System_String_)

### Remarks

**qSuccess** is set to true if the operation is successful.

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableByIdAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableByIdAsync.htm)

## DestroySessionVariableByIdAsync(AsyncHandle, String)

Removes a transient variable.

### Declaration

```

          public Task<bool> DestroySessionVariableByIdAsync(AsyncHandle asyncHandle, [QixName("qId")] string id)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.String | id | Identifier of the variable. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Boolean&gt; |  |

### Implements

[IApp.DestroySessionVariableByIdAsync(AsyncHandle, String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.DestroySessionVariableByIdAsync.htm#Qlik_Engine_IApp_DestroySessionVariableByIdAsync_Qlik_Engine_AsyncHandle_System_String_)

### Remarks

**qSuccess** is set to true if the operation is successful.

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableByIdAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.DestroySessionVariableByIdAsync.htm)

## DestroySessionVariableByIdAsync&lt;T&gt;(AsyncHandle, Func&lt;Response, T&gt;, String)

Removes a transient variable.

### Declaration

```
public Task<T> DestroySessionVariableByIdAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult, [QixName("qId")] string id)
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.Func&lt;[Response](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Communication.IO.Response.htm), T&gt; | onResult | Continuation function |
| System.String | id | Identifier of the variable. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;T&gt; |  |

### Type Parameters

| Name | Description |
| --- | --- |
| T |  |

### Implements

[IApp.DestroySessionVariableByIdAsync<T>(AsyncHandle, Func<Response, T>, String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.DestroySessionVariableByIdAsync.htm#Qlik_Engine_IApp_DestroySessionVariableByIdAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_)

### Remarks

**qSuccess** is set to true if the operation is successful.