Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Max number of pictures...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
copthesaint




PostPosted: Thu Dec 18, 2008 8:41 am   Post subject: Max number of pictures...

I keep getting an error for pictures not being able to exceed 1000
Whats the deal then with pic.free?
Sponsor
Sponsor
Sponsor
sponsor
Parker




PostPosted: Thu Dec 18, 2008 9:15 am   Post subject: RE:Max number of pictures...

Um, I think I had that problem once, when getting the picture don't have it in a loop, it can only get it so many times, if you wouldnt mind maybe a piece of the code for more help?
Tony




PostPosted: Thu Dec 18, 2008 10:23 am   Post subject: RE:Max number of pictures...

1000 is, in fact, the limit to the number of pictures you could initialize before calling Pic.Free on some of them.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Parker




PostPosted: Thu Dec 18, 2008 11:38 am   Post subject: RE:Max number of pictures...

^^Yes, but if you have one picture intitiallizing 1000 times (in a loop) it will cause an error.
Tony




PostPosted: Thu Dec 18, 2008 12:02 pm   Post subject: RE:Max number of pictures...

That's because you'll have 1000 instances of pictures, which happen to be pointing to the same image file, but all have unique IDs.

You are right though, using Pic.New inside a loop is a common way to quickly run out of available resources (while doing extra work).
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dan




PostPosted: Thu Dec 18, 2008 12:14 pm   Post subject: RE:Max number of pictures...

Simpley put you should not be intitiallizing the same picture more then once and using Pic.Free on it once you don't need it any more.

Also in the rare case where you do need to load more then 1000 pictures and have them all on the screen at once i blive you can load a pic, draw it and then free it and the will stay on the screen intill it is cleared.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
copthesaint




PostPosted: Fri Dec 19, 2008 8:49 am   Post subject: RE:Max number of pictures...

ya it's called pic.rotate ... you need to fix that because it gave me the max picture limitation.


var pic whatever

loop

var pic rotated

draw pic rotated

free pic rotated
end loop
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: