Re: Help Porint C++ code to C#



ttCmd.pDataBuf = pDataBuf;

pDataBuf is a reference to the byte type data buffer,so after this
assignment, ttCmd.pDataBuf's value is the value of the pDataBuf's ref
value.. so after the assignment ,the value of ttCmd.pDataBuf may be
equal to zero.
I think the may lead to null reference error!

.



Relevant Pages

  • Re: pass by reference
    ... focus has moved from insisting to use "by ref" in java-context ... independent of any other use of the word "reference" in a language. ... Just because Java-refs can be re-targetted by assignment? ... If Java had an operator to tell an Object ...
    (comp.lang.java.programmer)
  • Re: JavaScript knowledge test
    ... The assignment can produces a runtime error when the object being assigned to is a host object and it throws an exception when the assignment is made to an 'x' proeperty. ... on IE if no global 'x' variable is declared but an element exists in the DOM with the ID attribute "x" then IE creates an 'x' proeprty of the global object and assigns it a reference to the DOM element. ... The assigning of the returned inner function form that example to an intrinsic event property of a DOM node does result in the DOM node having an indirect reference to a JS object, but so long as the JS object does not then hold a reference to the DOM node the circle is not closed and no garbage collection issues follow. ...
    (comp.lang.javascript)
  • Re: OO Javascript for AJAX encapsulation
    ... function reference or an expression returning function ... In the second case we are creating variable "foo" and assigning ... In both cases a function object is created and a reference to ... that function is not assigned to the "foo" property until the assignment ...
    (comp.lang.javascript)
  • Re: JavaScript knowledge test
    ... The assignment can produces a runtime error when the object being ... proeprty of the global object and assigns it a reference to the DOM ... The other thing I use closures for is to associate ... the code in that article does not produce a memory leak on IE. IE's ...
    (comp.lang.javascript)
  • Re: pass by reference
    ... The only reason this doesn't work as they think, is because assignment ... because the pointer is what val *is*. ... The parameter is a reference, ... language that is entirely pass by value. ...
    (comp.lang.java.programmer)