[fpc-pascal] dynamic array and new/dispose
ik
idokan at gmail.com
Wed Feb 2 16:27:11 CET 2011
On Wed, Feb 2, 2011 at 17:18, Amit Bueno <amitbueno at gmail.com> wrote:
> The SubChunks are -- 'var subchunks array of pchunk;' contained in chunk
> before allocating the subchunks a setlength(subchunks, High(subchunks)+2)
> is called.
>
But does the X variable point to existed index in the array ? if not, then
it explains the "access violation".
> ---
> Amit
>
> On Wed, Feb 2, 2011 at 5:15 PM, ik <idokan at gmail.com> wrote:
>
>>
>>
>>
>> On Wed, Feb 2, 2011 at 16:57, Amit Bueno <amitbueno at gmail.com> wrote:
>>
>>> Seems that the ios doesn't allocated properly my objects,. after
>>> allocation when trying to run a function from the object it fails.
>>> I tried replacing the New(subchunks[X]) to SubChunks[X] :=
>>> AllocMem(sizeof(Chunk));
>>> Again this works on the windows, it doesn't on the ios.
>>>
>>> Have you got any ideas?
>>>
>>
>> Does "X" actually exists as an index (I mean the value of it) ?
>>
>>
>>
>>> ---
>>> Amit
>>>
>>> On Wed, Feb 2, 2011 at 3:34 PM, Amit Bueno <amitbueno at gmail.com>wrote:
>>>
>>>> Attached is the shrinked prof.rar file (481kb).
>>>> You can download it as well from:
>>>> http://bueno.co.il/files/prof.rar
>>>>
>>>>
>>>> ---
>>>> Amit
>>>>
>>>> -----Original Message-----
>>>> From: fpc-pascal-bounces at lists.freepascal.org
>>>> [mailto:fpc-pascal-bounces at lists.freepascal.org] On Behalf Of Jonas
>>>> Maebe
>>>> Sent: Wednesday, February 02, 2011 3:28 PM
>>>> To: FPC-Pascal users discussions
>>>> Subject: Re: [fpc-pascal] dynamic array and new/dispose
>>>>
>>>>
>>>> On 02 Feb 2011, at 14:10, Amit Bueno wrote:
>>>>
>>>> > Have you got the prof.rar?
>>>>
>>>> No. I've just looked at the posts held for moderation and your mail is
>>>> over
>>>> 5MB. That is way too large to send to a mailing list. First of all, make
>>>> sure to only include source code, not compiled units, programs or
>>>> resources.
>>>> Secondly, if it's that big, put it online on a website and only send the
>>>> link to the mailing list.
>>>>
>>>>
>>>> Jonas
>>>> _______________________________________________
>>>> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
>>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>>>
>>>
>>>
>>> _______________________________________________
>>> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>>
>>
>>
>> Ido
>> LINESIP - Opening the source for communication
>> http://www.linesip.com
>> http://www.linesip.co.il
>>
>>
>>
>> _______________________________________________
>> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
Ido
LINESIP - Opening the source for communication
http://www.linesip.com
http://www.linesip.co.il
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110202/aba3a8bf/attachment.html>
More information about the fpc-pascal
mailing list