Instance (computer science)
{{short description|Concrete manifestation of an object (class) in software development}}
{{Other uses|Instance (disambiguation)#Computing{{!}}Instance (disambiguation)}}
{{Multiple issues|
{{how-to|date=September 2022}}
{{more citations needed|date=June 2013}}
}}
In computer science, an instance is an occurrence of a software element that is based on a type definition. When created, an occurrence is said to have been instantiated, and both the creation process and the result of creation are called instantiation.
Examples
; Class instance: An object-oriented programming (OOP) object created from a class. Each instance of a class shares a data layout but has its own memory allocation.
; Computer instance: An occurrence of a virtual machine which typically includes storage, a virtual CPU.
; Polygonal model: In computer graphics, it can be instantiated in order to be drawn several times in different locations in a scene which can improve the performance of rendering since a portion of the work needed to display each instance is reused.
; Program instance: In a POSIX-oriented operating system, it refers to an executing process. It is instantiated for a program via system calls such as fork() and exec(). Each executing process is an instance of a program which it has been instantiated from.{{cite book |last=Bach |first=Maurice J. |title=The Design of the UNIX Operating System |publisher=Prentice Hall |year=1986 |isbn=0-13-201799-7 |archive-url=https://archive.org/details/designofunixoper00bach |archive-date=2010-03-15 |url={{Google books|id=NrBQAAAAMAAJ |plainurl=yes}} |pages=10, 24 }}
References
{{Reflist}}