<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Howdy!<br>
<br>
I am working on section of code that will be dealing with a large
number of records in a relatively tight loop and have a question in
how Erlang constructs a nested record.<br>
<br>
If I define a person and manager record:<br>
<br>
1> rd(person, {name, age}).<br>
person<br>
2> rd(manager, {person, dept}).<br>
manager<br>
<br>
Then create a person record:<br>
<br>
3> P = #person{name = bryan, age = 45}.<br>
#person{name = bryan,age = 45}<br>
<br>
And then a manager record:<br>
<br>
4> M = #manager{person = P, dept = foo}.<br>
#manager{person = #person{name = bryan,age = 45},dept = foo}<br>
<br>
When the manager record is created, is the nested person record P
referenced by the manager record M, or is it copied? <br>
<br>
Thanks,<br>
Bryan<br>
<br>
<div class="moz-signature">-- <br>
<p style="font-size:12px">
Bryan Hughes<br>
<b>Go Factory</b><br>
<a class="moz-txt-link-freetext" href="http://www.go-factory.net">http://www.go-factory.net</a><br>
<br>
<i>"Internet Class, Enterprise Grade"</i><br>
</p>
<p><br>
</p>
</div>
</body>
</html>