avoid creating temporary in genObjConstr if possible (#7032)
This commit is contained in:
parent
2aebb8ed7e
commit
d0a9fac362
3 changed files with 45 additions and 17 deletions
|
|
@ -1,3 +1,8 @@
|
|||
discard """
|
||||
output: '''42
|
||||
Foo'''
|
||||
"""
|
||||
|
||||
type TFoo{.exportc.} = object
|
||||
x:int
|
||||
|
||||
|
|
@ -48,3 +53,5 @@ type NamedGraphic = object of Graphic2
|
|||
|
||||
var ngr = NamedGraphic(kind: Koo, radius: 6.9, name: "Foo")
|
||||
echo ngr.name
|
||||
|
||||
GC_fullCollect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue