English
Bugs and vermeintliche

Done: Bugs with DISPOSE + Objektvariablen?

 

Sebastian
Sprenger
If I one Objekt with Dispose  freigebe and another Objekt in dieselbe Variable beget, I get under XProfan10Free and 11 whom Error Zuweisung this Objekt you don't say so . If I additional To or instead of the Dispose  a area with 0 Bytes dimensioniere, tuts! Why but not Dispose ?
CompileMarkSeparation
class KLASSE=feld%
var objekt#=new(KLASSE)
dispose objekt#  das alleine funktioniert nicht
dim objekt#,0  nur damit funktionierts
objekt#=new(KLASSE)/pre>
Desweiteren Have I the local, that Objects in Arrays none dispose d go... to that comparison: with this code without Arrays comes Yes the apparently right out:
CompileMarkSeparation
class KLASSE=feld%
var objekt#=new(KLASSE)
objekt#.feld%=12345
dispose objekt#
print classof(objekt#)  ""
print sizeof(objekt#)  0
print objekt#.feld%  stürzt ab, naja, existiert immerhin nicht mehr
waitin
>
but here...!? (one mind, that here the Neuzuweisungsproblem (s.o.) exists, the commands Dim  but well no Arrays expects...)
CompileMarkSeparation
class KLASSE=area%
declare Objects#[0]
objekte#[0]=new(KLASSE)
objekte#[0].area%=12345
dispose Objects#[0]
print classof(Objects#[0])  always yet "KLASSE"
print sizeof(Objects#[0])  always yet 2
print Objects#[0].area%  always yet 12345
waitinput
Greeting, Sebastian
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
10/11/08  
 




RGH
Hi,

single Arrayelemente cannot disposed go, separate only the complete aray:

Dispose Objects#[]
Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/11/08  
 




Sebastian
Sprenger
Individual not? OK... but even if I any at a single blow dispose, happens nothing:
CompileMarkSeparation
class KLASSE=feld%
declare objekte#[9]

whileloop 0,9

    objekte#[&loop]=new(KLASSE)
    objekte#[&loop].feld%=122*&loop

endwhile

dispose objekte#[]

whileloop 0,9

    objekte#[&loop].feld%=objekte#[&loop].feld%+&loop
    print classof(objekte#[&loop]),
    print sizeof(objekte#[&loop]),
    print objekte#[&loop].feld%

endwhile

waitinput
becomes the memory because there ever again released?
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
10/11/08  
 




Nico
Madysa
now have you got again forget, the aray with Dim To dimensionieren.
in principle ought to it so klappen:
CompileMarkSeparation
class KLASSE=feld%
declare objekte#[9]
Dim objekte#[] , KLASSE

whileloop 0,9

    objekte#[&loop]=new(KLASSE)
    objekte#[&loop].feld%=122*&loop

endwhile

dispose objekte#[]

whileloop 0,9

    objekte#[&loop].feld%=objekte#[&loop].feld%+&loop
    print classof(objekte#[&loop]),
    print sizeof(objekte#[&loop]),
    print objekte#[&loop].feld%

endwhile

waitinput

best is it, if You in the same Atemzuge, in the You Dim write, too the zugehörige Dispose ans end klatschst,

PS: In older windows-versions could it objectively occur, that the Speicherplatz nichtfreigegebener reaches too blockiert remaining. but ex WIndows XP ought to at the latest with End the last area automatically released go.
 
Nico Madysa
10/13/08  
 




RGH
@Nico:
Sebastian power it already correctly.: Beii one Objekt- or structure-aray can each individual element a class or. a structure allocate, even each element another.

@Stefan:
you have right. evident works here DPSPOSE not reliably. i'll it me time hither standing ...

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/13/08  
 




Nico
Madysa
ash on mien master, I Have the "New" saponaceous overlooking...
 
Nico Madysa
10/13/08  
 




RGH
OK, I have in the lunchtime once more accurate nachgesehen:

1. the first named trouble (without Bereisarray) concerns only The NEW-function: tappt im dunkeln functions objectively to one Dispose with Objects not. the Dispose watts but correctly implemented and the memory released. Workaround: Possibility 1: but not Dispose in this drop "dim objekt#,0" using. One Dispose is then not necessary. Possibility 2: The class with Dim allocate "Dim objekt#, KLASSE".

2. the Disposen of Area array functions objectively not. Workaround: One Area array not multiple use. at that End of program becomes the memory released.

both Bugs go in the next Version fixed.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/13/08  
 




RGH
... what about me set yet a on it:

ex the next Version (möglicherweise 11.1) becomes it too possible his, one single element one Bereichs-, structure- or Objekt-Arrays To disposen:

Dispose Objects[5]
this element can then with New again a class or structure allocated go.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/14/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.497 Views

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie