Do not copy the spec during attach.
Use a reference count for managing the memory. PiperOrigin-RevId: 716169486 Change-Id: Id270c4858c17b9250115e9544d5ea143584e2d5f
This commit is contained in:
committed by
Copybara-Service
parent
6436055c6c
commit
c2138c3fb0
@@ -1045,6 +1045,24 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
|
||||
),
|
||||
doc='Activate plugin. Returns 0 on success.',
|
||||
)),
|
||||
('mjs_setDeepCopy',
|
||||
FunctionDecl(
|
||||
name='mjs_setDeepCopy',
|
||||
return_type=ValueType(name='int'),
|
||||
parameters=(
|
||||
FunctionParameterDecl(
|
||||
name='s',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjSpec'),
|
||||
),
|
||||
),
|
||||
FunctionParameterDecl(
|
||||
name='deepcopy',
|
||||
type=ValueType(name='int'),
|
||||
),
|
||||
),
|
||||
doc='Turn deep copy on or off attach. Returns 0 on success.',
|
||||
)),
|
||||
('mj_printFormattedModel',
|
||||
FunctionDecl(
|
||||
name='mj_printFormattedModel',
|
||||
|
||||
Reference in New Issue
Block a user