Class LabelEntryMatchCache
Cache of instance id -> label entry index for a LabelConfig. This is not well optimized and is the source of a known memory leak for apps that create new instances frequently.
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.LabelManagement
Assembly: Unity.Perception.Runtime.dll
Syntax
[MovedFrom("UnityEngine.Perception.GroundTruth")]
public class LabelEntryMatchCache : IGroundTruthGenerator, IDisposable
Methods
Dispose()
Disposes cache
Declaration
public void Dispose()
TryGetLabelEntryFromInstanceId(uint, out IdLabelEntry, out int)
Retrieves the label entry for the given instance id.
Declaration
public bool TryGetLabelEntryFromInstanceId(uint instanceId, out IdLabelEntry labelEntry, out int index)
Parameters
Type | Name | Description |
---|---|---|
uint | instanceId | The instance id to look up |
IdLabelEntry | labelEntry | The IdLabelEntry of the match if found. Otherwise returns .
|
int | index | The index of the matched IdLabelEntry in the IdLabelConfig if found. Otherwise returns -1. |
Returns
Type | Description |
---|---|
bool | True if a the instance id was found in the cache. |