Questions tagged [object-reference]

An Object reference is a pointer to an object stored in memory. The main difference is that the object was previously created (via a new operator, for instance) and its reference is kept via an additional variable, that is, its object reference.

An Object reference is a pointer to an object stored in memory. The main difference is that the object was previously created (via a new operator, for instance) and its reference is kept via an additional variable, that is, its object reference.

More Info

325 questions
1
vote
3 answers

In PHP, when $foo = new Foo(), technically speaking, is $foo an object, or is $foo a reference?

Update: in http://php.net/manual/en/language.oop5.references.php it says: One of the key-points of PHP5 OOP that is often mentioned is that "objects are passed by references by default". This is not completely true. Why is that? The…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
1
vote
0 answers

DCOM Object Reference C#

I am trying to add a reference of the remote computer in a local network (computer name or IP address) to a DCOM object. Just for example: When I do the following it works on the local machine: private void btnOpnDWSFT_Click(object sender, EventArgs…
1
vote
3 answers

Ionic 2: Pass param to next page as copy, not by reference

Q) How do I pass my param to the next page as a copy, so that changes to it don't persist in the previous screen when I go back? e.g. showDetails(item) { this._nav.push(PersonDetailsPage, { person: item }); } So when I view…
Dave
  • 5,283
  • 7
  • 44
  • 66
1
vote
0 answers

Destroying php object references

I will try to be succinct on this: I have this: Example1: $obj1 = new SimpleObj(); $obj2 = $obj1; $obj2 = null; Example2: $obj1 = new SimpleObj(); $obj2 = clone $obj1; $obj2 = null; Example3: $obj1 = new SimpleObj(); $obj2 =& $obj1; $obj2 =…
Valentoni
  • 308
  • 4
  • 19
1
vote
0 answers

System.NullReferenceException: Object reference not set to an instance of an object. at LicenseParser.RawDataReader.ParseIT(String LicenseID)

I know this error has been mentioned several times on this site, but i can't figure out what specifically i need to change in order to fix my code. 'LicenseID' is not being recognized when i run the following code... Main page:…
1
vote
1 answer

How a method can be called without object reference

I am learning android and I am newbie. I encountered a code i.e. FramgmentManager fm = getFragmentManager(); I know that getFragmentManager() is a method defined in Activity class. In java we access method through object reference that is…
Vipin Dubey
  • 582
  • 1
  • 9
  • 26
1
vote
3 answers

Function within function within function seems to be losing temporary variables in javascript

I can't understand why my code is not working. Simply put, there are three function levels: an access function to initiate the process, a DOB function which is the core of the program, and several functions within including a PROBLEM function that I…
CJW
  • 81
  • 7
1
vote
0 answers

I want When CashDisc=0 when total-cashDisc

public void Cashdis() { decimal t = Convert.ToDecimal(TxtToatal.Text); if (TxtcashDisc.Text == String.Empty) { CashDisc = 0; index = lstvItems.FocusedItem.Index; removetotal =…
Sahal Zaman
  • 235
  • 1
  • 2
  • 10
1
vote
2 answers

SSRS 2008 - Error opening Report that has subreports in Report Manager - Object reference not set to an instance of an object

This is the scenario. A report was working fine in SSRS 2005. It has 4 subreports, one of which has two subreports. The server got upgraded to 2008 (not R2). Now the reports returns >An error occurred during client rendering. >An error has occurred…
1
vote
1 answer

Remove objects from array/hash which is only referenced from that array/hash

Is it possible to remove objects from an array/hash which is only referenced from this array/hash? Example of what I am looking for: some_array.reject!{|elm| ObjectSpace.only_one_reference_to?(elm)} I am making a script which seem to be growing…
Automatico
  • 12,420
  • 9
  • 82
  • 110
1
vote
1 answer

NullReferenceException when reading from a file

I need to read a file structured like this: 01000 00030 00500 03000 00020 And put it in an array like this: int[,] iMap = new int[iMapHeight, iMapWidth] { {0, 1, 0, 0, 0}, {0, 0, 0, 3, 0}, {0, 0, 5, 0, 0}, {0, 3, 0, 0, 0}, {0, 0, 0, 2,…
Joshua
  • 71
  • 6
1
vote
0 answers

Why do i keep getting a Object reference not set to an instance of an object exception?

In my app i have created 6 different pages with a final sub total on each page. Now i want to bring all those totals to the end page 'Total Page'. I use this code : `App1.Signage.AnotherPagePayLoad passedSignParameter = e.Parameter as…
1
vote
5 answers

Equal strings auto updating (List object reference)

I recently did an exam for university and I got asked what would be the output of this program: def fun(x): y=x x.append(4) print(str(x)+" "+str(y)) fun(["one","two",3,5.0]) I answered that the y list would be ["one","two", 3,5.0] and…
OCA
  • 111
  • 2
  • 8
1
vote
0 answers

Python references: Why does builtin function 'id' behave differently for different literals?

Apologies for a question that seems very basic/trivial but I don't understand the following behaviours: >>> id_1 = id(256) >>> id_2 = id(256) >>> id_1 == id_2 True >>> id_1 = id(257) >>> id_2 = id(257) >>> id_1 == id_2 False >>> id_1 = id("ab") >>>…
0xc0de
  • 8,028
  • 5
  • 49
  • 75
1
vote
5 answers

When const ref being replaced by the original object (non-const), does the const-ness goes away?

I often see statements like below in C++ books regarding reference: Reference is just another name of the original object. When it is used, it is replaced by the original object (in most cases). Here is the question: If I bind a const ref to…
user3424826