Hi!
I will explain 3 situation and I wish to know how is the best in term of performance.
There is a class A that create a large matrix of int (M[][]), and there is a class B that in something way has to mange it.
1) M[][] is static, so B can access to it from any function calling A.M[][]
2) M[][] is private, and is passed in the costructor of B, and a loca copy is assigned to M[][] (this.m[][] = M[][])
3) M[][] is public, and A is passed in the costructor of B, so B can access to M[][] calling a.M[][] ) (where in the costructor of B there is: this.a = A)
I hope that is clear..
Many thanks!

Reply With Quote

