struct Data {};
List<Data> getData() {...};
void insertData(List<Data>) {...};
main()
{
insertData(getData());
}
so....if i had code like that. would it be better performance-wise if i made 'Data' a class instead of a struct? it seems like I would be making three copies of each struct(they would get managed, but still...): once in getData(), second in the return value of getData(), and lastly when insertData() is run, it'll make a local copy of the arguments passed to it.
never really worked with structs before. so please bear with my stupidity and bad assumptions. can I even put structs into a collection and pass them around?
This post has been edited by Sergio Tapia: 26 July 2011 - 05:41 AM

New Topic/Question
Reply




MultiQuote







|